write('---MENU---'),nl,
write('1.BIODATA'),nl,
write('2.LUAS SEGITIGA'),nl,
write('3.LUAS LINGKARAN'),nl,
write('4.KELUAR'),nl,
write('Masukkan Pilihan Anda [1...4] : '),read(P),nl,
(P = 1->nl,
write('BIODATA'),nl,
write('Masukkan Nama :'),read(M),nl,
write('Masukkan NPM :'),read(N),nl,
write('Masukkan Kelas :'),read(K),nl,
write('Nama :'),write(M),nl,
write('NPM :'),write(N),nl,
write('Kelas :'),write(K),nl,
menu;
P = 2->nl,
write('LUAS SEGITIGA'),nl,
write('Masukkan Alas :'),read(A),nl,
write('Masukkan Tinggi :'),read(T),nl,
S is A*T/2,nl,
write('Luas Segitiga :'),write(S),nl,
menu;
P = 3->nl,
write('LUAS LINGKARAN'),nl,
write('Masukkan Jari-jari :'),read(R),nl,
L is 3.14*R*R,nl,
write('Luas Lingkaran :'),write(L),nl,
menu;
P = 4->nl,
write('Anda Telah Keluar'),nl).
Tidak ada komentar:
Posting Komentar