Desc :
Source Code :
#include <iostream>
using namespace std;
int main()
{
int one = 1;
int two = 2;
int three = 3;
int four = 4;
cout << "1 + 3 = " << one + three << endl;
cout << "4 - 2 = " << four - two << endl;
cout << "2 * 3 = " << two * three << endl;
cout << "4 / 2 = " << four / two << endl;
cout << "2 + 3 * 4 = " << two + three * four << endl;
cout << "1 + 4 / 2 = " << one + four / two << endl;
return 0;
}
Result :
'C++' 카테고리의 다른 글
[C++] 007 자료형 (0) | 2021.01.22 |
---|---|
[C++] 006 사칙연산 축약 (0) | 2021.01.22 |
[C++] 004 상수 (0) | 2021.01.22 |
[C++] 003 변수 (0) | 2021.01.22 |
[C++] 002 콘솔창 출력 (0) | 2021.01.22 |