Program_KalkulatorFisika
Deklarasi
Pilihan, massa_jenis, massa,
volume, m, v, tekanan, gaya, luas_permukaan, f, a, gaya_berat, usaha, jarak, s,
kelajuan, waktu, t : Integer
Integer :
g = 10
Deskripsi
Start
WriteLn
(“Pilihan pemrosesan anda :”) ;
Read
(“pilihan”) ;
Switch
(pilihan) ;
Case
1 :
PrintLn
(“1. Menghitung Massa Jenis”) ;
Write
(“Input Massa”) ;
Read
(“m”) ;
Write
(“Input Volume”) ;
Read
(“v”) ;
massa_jenis
= m/v ;
PrintLn
(“Massa Jenis : “,massa_jenis,”) ;
Break
;
Case
2 :
PrintLn
(“2. Menghitung Tekanan”) ;
Write
(“Input Gaya”) ;
Read
(“f”) ;
Write
(“Input Luas Permukaan”) ;
Read
(“a”) ;
tekanan
= f/a ;
PrintLn
(“Tekanan : “,tekanan,”) ;
Break
;
Case
3 :
PrintLn
(“3. Menghitung Gaya Berat”) ;
Write
(“Input Massa”) ;
Read
(“m”) ;
gaya_berat
= m*g ;
PrintLn
(“Gaya Berat : “,gaya_berat,”) ;
Break
;
Case
4 :
PrintLn
(“4. Menghitung Usaha”) ;
Write
(“Input Gaya”) ;
Read
(“f”) ;
Write
(“Input Jarak”) ;
Read
(“s”) ;
usaha
= f*s ;
PrintLn
(“Usaha : “,usaha,”) ;
Break
;
Case
5 :
PrintLn
(“5. Menghitung Kelajuan”) ;
Write
(“Input Jarak”) ;
Read
(“s”) ;
Write
(“Input Waktu”) ;
Read
(“t”) ;
kelajuan
= s/t ;
PrintLn
(“Kelajuan : “,kelajuan,”) ;
Break
;
End
Tidak ada komentar:
Posting Komentar