daily pastebin goal
23%
SHARE
TWEET

Factorial

a guest Jan 17th, 2018 68 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top