Pertemuan5 - Looping Control
Pertemuan5 - Looping Control
Looping Control
Do-while
While
For
Oleh : Anastasya Latubessy, S.Kom, M.Cs
Terdapat
Situasi
seperti apa?
do- while
Perulangan
While loop
Algoritma TestWhile()
x 10
While(x<20)
print(x)
x++
End while
Implementasi while
Perulangan
Perhatikan
Do-while
Algoritma TestDoWhile()
X 10
Do
print (x)
x++
While(x<20)
End while
End do
Implementasi do-while
Perulangan
For Loop
Algoritma TesFor()
For(x10; x<20; x++)
print(x)
End for
Implementasi for
Buat
Tugas