Search

μ—°μ‚°μž

μ—°μ‚°μž

β€’
μ‚°μˆ  μ—°μ‚°μž
β€’
λŒ€μž… μ—°μ‚°μž
β€’
증감 μ—°μ‚°μž
β€’
비ꡐ μ—°μ‚°μž
β€’
논리 μ—°μ‚°μž
β€’
λΉ„νŠΈ μ—°μ‚°μž

μ‚°μˆ  μ—°μ‚°μž

μ—°μ‚°μž
μ„€λͺ…
μ˜ˆμ‹œ
+
λ§μ…ˆ
a + b
-
λΊ„μ…ˆ
a - b
*
κ³±μ…ˆ
a * b
/
λ‚˜λˆ—μ…ˆ
a / b
%
λ‚˜λ¨Έμ§€ (λͺ¨λ“ˆλ‘œ)
a % b

λŒ€μž… μ—°μ‚°μž

μ—°μ‚°μž
μ„€λͺ…
μ˜ˆμ‹œ
=
κΈ°λ³Έ λŒ€μž…
a = b
+=
λ”ν•΄μ„œ λŒ€μž…
a += b
-=
λΉΌμ„œ λŒ€μž…
a -= b
*=
κ³±ν•΄μ„œ λŒ€μž…
a *= b
/=
λ‚˜λˆ„μ–΄μ„œ λŒ€μž…
a /= b
%=
λ‚˜λ¨Έμ§€λ₯Ό ꡬ해 λŒ€μž…
a %= b

증감 μ—°μ‚°μž

μ—°μ‚°μž
μ„€λͺ…
μ˜ˆμ‹œ
++
1μ”© 증가 (μ „μœ„/ν›„μœ„)
++a, a++
--
1μ”© κ°μ†Œ (μ „μœ„/ν›„μœ„)
--a, a--

비ꡐ μ—°μ‚°μž

μ—°μ‚°μž
μ„€λͺ…
μ˜ˆμ‹œ
==
κ°™μŒ
a == b
!=
같지 μ•ŠμŒ
a != b
>
큼
a > b
<
μž‘μŒ
a < b
>=
ν¬κ±°λ‚˜ κ°™μŒ
a >= b
<=
μž‘κ±°λ‚˜ κ°™μŒ
a <= b

논리 μ—°μ‚°μž

μ—°μ‚°μž
μ„€λͺ…
μ˜ˆμ‹œ
&&
논리 AND
a && b
||
논리 OR
a || b
!
논리 NOT
!a

λΉ„νŠΈ μ—°μ‚°μž

μ—°μ‚°μž
μ„€λͺ…
μ˜ˆμ‹œ
&
λΉ„νŠΈ AND
a & b
`
`
λΉ„νŠΈ OR
^
λΉ„νŠΈ XOR
a ^ b
~
λΉ„νŠΈ NOT
~a
<<
μ™Όμͺ½ μ‹œν”„νŠΈ
a << 2
>>
였λ₯Έμͺ½ μ‹œν”„νŠΈ
a >> 2
>>>
λΆ€ν˜Έ μ—†λŠ” 였λ₯Έμͺ½ μ‹œν”„νŠΈ
a >>> 2