Computer Science, asked by sharonlakra2260, 4 months ago

WAP to input a number and calculate the factorial of that number.
(Hints: Let n=5, factorial=5x4x3x2x1=120)

Answers

Answered by shashichandanabs
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 divyansh05887
0

Answer:

HERE IS YOUR ANSWER..

HOPE IT HELPS YOU..

Attachments:
Similar questions