Skip to content

Instantly share code, notes, and snippets.

@Baekjoon
Created May 17, 2015 13:01
Show Gist options
  • Save Baekjoon/88e19396b59fe6128818 to your computer and use it in GitHub Desktop.
Save Baekjoon/88e19396b59fe6128818 to your computer and use it in GitHub Desktop.
for2
#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