Advertisement
zfhridoy47

loop_problem_7

Jun 25th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.13 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.  
  5. int i,n,s=0;
  6.  
  7. scanf("%d",&n);
  8. for(i=2;i<=n;i+=2)
  9. s=s+i;
  10.      printf("%d \n",s);
  11.  
  12. return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement