Wednesday, March 30, 2011

chapter 4

chapter 4

1) Arithmetic operators :
    + + (Unary Plus)
    - - (Unary minus)
    + (Addition)
    - (Substraction)
    * (multiplication)
    / (Floating-point division / Integer division)
    % (Modulus)
Dlm C++, ade increament nan decrement operator..
    + + (Pre-increment) e.g + +m
    + + (Post-increment) e.g m+ +
    - - (Pre-decrement) e.g - -n
    - - (Post-decrement) e.g n- -

Tips utk sng hfl : klw simbol dy tuh kt dpn variable (Pre-), kne tambah or tolak nan 1.. tp klw simbol kt blkng (Post-) xyah tmbah pape.. ekot jek mcm soklan dy.. aq bg cth k..
SOALAN :        a = 2 , b = 3
                      m = 2 , n = 3
                       p = 2 , q = 3
                       x = 2 , y = 3            

(+ + a) + (- - b) * 4 > (+ + m) * (- - n) + 4

No comments:

Post a Comment