Computer Science, asked by sanyakt11, 8 hours ago

Input a number and find its factorial.​

Answers

Answered by harmansingh64889
0

Answer:

Factorial Program using loop

#include<stdio.h>int main(){int i,fact=1,number;printf("Enter a number: ");scanf("%d",&number);for(i=1;i<=number;i++){fact=fact*i;

Answered by ujjwal99355
0

Answer in C language:

#include<stdio.h>  

int main()    

{    

int i,fact=1,number;    

printf("Enter a number: ");    

 scanf("%d",&number);    

   for(i=1;i<=number;i++){    

     fact=fact*i;    

 }    

 printf("Factorial of %d is: %d",number,fact);    

return 0;  

}  

Similar questions