Program_KalkulatoFisika
Deklarasi
pilihan, massa_jenis, massa,
volume, m, v, hasil, tekanan, gaya, luas_permukaan, f, a, gaya_berat, hasil_1,
hasil_2, hasil_3, usaha, hasil_4, hasil_5, jarak, s, waktu, t : Integer
Deskripsi
Start
PrintLn
(“***************************************************”) ;
PrintLn (“ KALKULATOR
FISIKA “)
;
PrintLn
(“***************************************************”) ;
Print (“Pilihan pemrosesan :”) ;
PrintLn (“Menghitung Massa Jenis”) ;
PrintLn (“Tekanan”) ;
PrintLn (“Gaya Berat”) ;
PrintLn (“Usaha”) ;
PrintLn (“Kelajuan”) ;
Write (“Pilihan pemrosesan anda :”) ;
Read (“pilihan”) ;
Switch (pilihan) {
Case 1 :
PrintLn (“1. Menghitung Massa Jenis”) ;
Write (“Input Massa”) ;
Read (“m”) ;
Write (“Input Volume”) ;
Read (“v”) ;
Hasil_1 = (m/v) ;
PrintLn (“Hasil : “ + hasil_1+”) ;
Break ;
Case 2 :
PrintLn (“2. Menghitung Tekanan”) ;
Write (“Input gaya”) ;
Read (“f”) ;
Write (“Input luas permukaan”) ;
Read (“a”) ;
Hasil_2 = (f/a) ;
PrintLn (“Hasil : “ + hasil_2+”) ;
Break ;
Case 3 :
PrintLn (“3. Menghitung Gaya Berat”) ;
Write (“Input Massa”) ;
Read (“m”) ;
Hasil_3 = (m*10) ;
PrintLn (“Hasil : “ + hasil_3+”) ;
Break ;
Case 4 :
PrintLn (“4. Menghitung Usaha”) ;
Write (“Input Gaya”) ;
Read (“f”) ;
Write (“Input Jarak”) ;
Read (“s”) ;
Hasil_4 = (f*s) ;
PrintLn (“Hasil : “ + hasil_4+”) ;
Break ;
Case 5 :
PrintLn (“5. Menghitung Kelajuan”) ;
Write (“Input Jarak”) ;
Read (“s”) ;
Write (“Input Waktu”) ;
Read (“t”) ;
Hasil_5 = (s/t) ;
PrintLn (“Hasil : “ + hasil_5+”) ;
Break ;
PrintLn (**********************TERIMA
KASIH*******************) ;
Tidak ada komentar:
Posting Komentar