Professional Documents
Culture Documents
Struktur
Tipe Data
Variable
• Global Variable
• Local Variable
Operator
Operator name Operator simple Description Example
A + B will give
addition + Adds two operands
30
A * B will give
multiplication * Multiply both operands
200
Operator equal to ==
Checks if the value of two
operands is equal or not, if yes
then condition becomes true.
(A == B) is not true
9 = 9 TRUE
10 != 9 TRUE
9 < 8 FALSE
10 > 2 TRUE
3 <= 7 TRUE
4 >= 8 FALSE
Operator
Operator name Operator simple Description Example
• Berapakah nilai x ?
While Loop
• Berapa nilai a yang akan tampil pada
baris ke-8 ?
do-while
• Berapa nilai a yang akan tampil
pada baris ke-7?
for
• Berapa nilai total pada baris ke 7 pada
gambar dibawah ?