Advertisement
Md_hosen_zisad

factwhilei--

Aug 16th, 2017
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     double i,n,fact=1;
  5.     scanf("%lf",&n);
  6.  
  7.      i=n;
  8.     while(i>=1)
  9.     {
  10.         fact=fact*i;
  11.         i--;
  12.  
  13.     }
  14.     printf("factorial %lf",fact);
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement