INCLUDE Irvine32.inc
.data
num DWord ?
fact DWord 1
str1 DB "Enter a number to Calculate Factorial: ",0
str2 DB "The Factorial is: ",0
.code
main PROC
call clrscr
mov edx,OFFSET str1
call WriteString
call ReadDec
mov num,eax
mov ecx,num
L1 :
mov eax,ecx
mov ebx,fact
mul ebx
mov fact,ebx
LOOP L1
mov edx,OFFSET str2
call WriteString
mov eax,fact
call WriteDec
exit
main ENDP
END main
Copyright © 2026 eLLeNow.com All Rights Reserved.