daily pastebin goal
39%
SHARE
TWEET

Untitled

a guest Feb 21st, 2018 57 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int n,i,c;
  6.     float p;
  7.     scanf("%d",&n);
  8.     p=2;c=1;
  9.     for (i=1;i<n;i++)
  10.     {
  11.         c*=(i+1);
  12.         p*=(1+ 1.0/c);
  13.     }
  14.     printf("%f\n",p);
  15.     return 0;
  16. }
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