Created
May 17, 2015 12:33
-
-
Save Baekjoon/31cd706a535269881517 to your computer and use it in GitHub Desktop.
5.cpp
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 a = 5; | |
a = 6; // a에 6을 넣는다 | |
a = a + 1; // a에 a+1을 넣는다 a=7 | |
a++; // a의 값을 1 증가시킨다 a=8 | |
++a; // a의 값을 1 증가시킨다 a=9 | |
a += 1; // a = a + 1와 같음 a=10 | |
a = a - 1; // 9 | |
a--; // 8 | |
--a; // 7 | |
a -= 1; // 6 | |
cout << a << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment