Skip to content

Instantly share code, notes, and snippets.

@Baekjoon
Created May 17, 2015 12:55
Show Gist options
  • Save Baekjoon/a478cea75f86ea3212c9 to your computer and use it in GitHub Desktop.
Save Baekjoon/a478cea75f86ea3212c9 to your computer and use it in GitHub Desktop.
for
#include <iostream>
using namespace std;
int main() {
// 1부터 10까지 출력하는 프로그램
for (int i = 1; i <= 10; i++) {
cout << i << endl;
}
// 10부터 1까지 출력하는 프로그램
for (int i = 10; i >= 1; i--) {
cout << i << endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment