Computer Science, asked by amansingh1070, 9 months ago

write a program of factorial of any number​

Answers

Answered by SHIBASANKARmallia
1

Explanation:

Pictorial Presentation:

Sample Solution:

C Code: #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); } ...

Flowchart:

C Programming Code Editor:

More items...•Feb 26, 2020

Answered by hkaur6479
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);

}

Input the number : 5

Input the number : 5 The Factorial of 5 is: 120

Hope it helps uu

Happy independence day mate...

Similar questions