CLS
INPUT"ENTER A NUMBER";N
F=1
FOR I = 1 TO N
F = F * 1
NEXT I
PRINT"THE FACTORIAL=";F
END
Note: Factorial is the product of numbers up to the range of a number. Factorial of 5 is 5 x 4 x 3 x 2 x 1 = 120. |
Questions
Quick Access
Exam Capsule
MCQ
Articles
Institutes
Notices
Top Topics
Write a program to input a number and find the factorial of the number.
CLS
INPUT"ENTER A NUMBER";N
F=1
FOR I = 1 TO N
F = F * 1
NEXT I
PRINT"THE FACTORIAL=";F
END
Note: Factorial is the product of numbers up to the range of a number. Factorial of 5 is 5 x 4 x 3 x 2 x 1 = 120. |
Who is a system analyst? What are the characteristics of system analysts? 1
What are the different stages of the system development life cycle (SDLC) 1
What do you understand about AI? What are the negative and positive aspects of AI in society? 1
How does an AI application work? Can a computer really think with the aid of AI? 1
PathshalaNepal.com is a Registered Company of E. Pathshala Pvt Ltd Nepal. Registration number : 289280
© 2020. All right Reversed.E. Pathshala Pvt Ltd