Skip to content

Instantly share code, notes, and snippets.

@Baekjoon
Created May 17, 2015 12:33
Show Gist options
  • Save Baekjoon/31cd706a535269881517 to your computer and use it in GitHub Desktop.
Save Baekjoon/31cd706a535269881517 to your computer and use it in GitHub Desktop.
5.cpp
#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