WAP to input a number and calculate the factorial of that number.
(Hints: Let n=5, factorial=5x4x3x2x1=120)
Answers
Answered by
0
Answer:
#include <stdio.h>
void main(){
int i,f=1,num;
printf("Input the number : ");
scanf("%d",&num);
for(i=1;i<=num;i++)
f=f*i;
printf("The Factorial of %d is: %d\n",num,f);
}
Answered by
0
Answer:
HERE IS YOUR ANSWER..
HOPE IT HELPS YOU..
Attachments:
Similar questions
Math,
2 months ago
English,
2 months ago
Math,
2 months ago
Math,
4 months ago
Social Sciences,
4 months ago
World Languages,
9 months ago
English,
9 months ago
Math,
9 months ago