fork download
  1. #include<stdio.h>
  2. int main(){
  3. // write a program to calculate the sum of the number occuring in the multiplcation table 8
  4. int product=1;
  5. int i=1;
  6. int n=6;
  7. while(i<=n){
  8. product*=i;
  9. i++;
  10. }
  11. printf("the factorial is %d\n",product);
  12.  
  13. return 0;
  14.  
  15. }
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
the factorial is 720