본문 바로가기

W3 Schools C, C++

04.연산자

728x90
반응형

C++ Operators (w3schools.com)

 

C++ Operators

C++ Operators C++ Operators Operators are used to perform operations on variables and values. In the example below, we use the + operator to add together two values: Although the + operator is often used to add together two values, like in the example abov

www.w3schools.com


이번에는 C, C++ 그런거 없이 그냥 설명하겠다.

 

더하기 빼기 뭐 그런건 다 알것이니 패스.

%는 나눗셈의 나머지이고, ++과 --는 값에서 1을 더하거나 빼는건데, 위 예시처럼 ++x로만 맞춰 쓸 필요는 없다. x++로 해도 잘 된다.

이것들도 그냥 더하기 빼기다. +=은 x=x+1 이런거다.

 

 

728x90
반응형

'W3 Schools C, C++' 카테고리의 다른 글

03.입출력  (0) 2021.05.28
02.변수 선언  (0) 2021.05.26
01.Hello World  (0) 2021.05.26
W3 스쿨의 C, C++ 따라하기  (0) 2021.05.25