12.07.2015 Views

MODUL PRAKTIKUM C ++ - iLab - Universitas Gunadarma

MODUL PRAKTIKUM C ++ - iLab - Universitas Gunadarma

MODUL PRAKTIKUM C ++ - iLab - Universitas Gunadarma

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Modul C<strong>++</strong>nilai int, 0 untuk mereprensentasikan "false" dan 1 untuk merepresentasikan "true".Operator-operator relasional pada C<strong>++</strong> :== Equal!= Different> Greater than< Less than>= Greater or equal than= c)(b+4 > a*c)((b=2) == a)would return true since (2*3 >= 6) is it.would return false since (3+4 > 2*6) is it.would return true.Logic operators ( !, &&, || ).Operator ! equivalen dengan operasi boolean NOT, hanya mempunyai 1 operand,berguna untuk membalikkan nilai dari operand yang bersangkutan. Contoh :returns false because the expression at its right (5 == 5)!(5 == 5)would be true.!(6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!