fork download
  1. #include<stdio.h>
  2. void main()
  3. {
  4. int i;
  5. int n;
  6. int fact;
  7. fact=1;
  8. printf("ENTER A NUMBER WHOSE FACTOTIAL TO BE FIND");
  9. scanf("%d",&n);
  10. for(i=1;i<=n;i++)
  11. {
  12. fact=fact*i;
  13. }
  14. printf("FACTORIAL IS =%d",fact);
  15. }
Runtime error #stdin #stdout 0.02s 4272KB
stdin
5
stdout
Standard output is empty