Advertisement
shohan11421

1

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