SHARE
TWEET

sum of odd number

Abdullah_A_lAsif_001 Jun 25th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int i,n,sum=0;
  5.     scanf("%d",&n);
  6.     for(i=1; i<=n ; i=i+2)
  7.     {
  8.  
  9.     sum=sum+i;
  10.     }
  11.     printf("%d\n",sum);
  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