Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $hitung_kepala = 0;
- while ($hitung_kepala < 3) {
- $putar = rand(0,1);
- if ($putar){
- $hitung_kepala ++;
- echo "(kepala) ";
- }
- else {
- $hitung_kepala = 0;
- echo "(buntut) ";
- }
- }
- $kondisi = true;
- while ( $kondisi == true){
- // tulis pesan di bawah
- echo "Loop sedang jalan!";
- // untuk mencegah
- // loop tak terbatas
- $kondisi = false;
- echo "\n";
- }
- echo "Dan loop pun berakhir";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement