Advertisement
Guest User

Untitled

a guest
Apr 20th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. // What will this get?
  2. #include <iostream>
  3. using namespace std;
  4. int main()
  5. {
  6. int i, sum=0;
  7. for (i = 1; i <= 150; i++)
  8. {
  9. if (i % 2 == 0)
  10. sum=sum+i;
  11. }
  12. cout << sum;
  13. return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement