daily pastebin goal
26%
SHARE
TWEET

Factorial

a guest Jan 17th, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5.     int n,fact=1,i;
  6.     printf("Enter your Number : ");
  7.     scanf("%d",&n);
  8.     for(i=2;i<=n;i++)
  9.         fact=fact*i;
  10.     printf("\nFactorial = %d\n",fact);
  11.  
  12.     return 0;
  13. }
RAW Paste Data
Top