Computer Science, asked by cherry3240, 10 months ago

write a programme to find factorial of a number using for statement by using int​

Answers

Answered by kgurjeet603pduuxd
2

#include<stdio.h>

int main(){

long f=1;

int i,num,min,max;

printf("Enter the minimum range: ");

scanf("%d",&min);

printf("Enter the maximum range: ");

scanf("%d",&max);

printf("Factorial series in given range: ");

for(num=min;num<=max;num++){

f=1;

for(i=1;i<=num;i++)

f=f*i;

printf("%ld ",f);

}

return 0;

}

Similar questions