Created
May 17, 2015 13:01
-
-
Save Baekjoon/88e19396b59fe6128818 to your computer and use it in GitHub Desktop.
for2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
int sum = 0; | |
for (int i = 2; i <= 10; i+=2) { | |
cout << i << endl; | |
} | |
for (int i = 1; i <= 10; i++) { | |
if (i % 2 == 0) { | |
cout << i << endl; | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment