free c programming course
Tuesday, 1 January 2008
Write an assembly language program in c program to find out factorial of given number?
Answer:
void main(){ int num; clrscr(); scanf("%d",&num); asm mov ax,1; asm mov bx,1; asm mov cx,num; come: asm mul bx; asm inc bx; asm dec cx; asm jnz come; printf("%d ",_AX); getch(); }More question
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment