Question:Factorial series in c
Answer
#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; }Sample output: Enter the minimum range: 1 Enter the maximum range: 10 Factorial series in given range: 1 2 6 24 120 720 5040 40320 362880 3628800
+ Report
Factorial series in c