fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n;
  6. cin >> n;
  7. int s = 0;
  8. for (int i; i <= n; i++) {
  9. i % 2 == 0 ;
  10. s += i;
  11. }
  12. cout << s;
  13. return 0;
  14. }
Success #stdin #stdout 0s 5308KB
stdin
6
stdout
Standard output is empty