Source code Case Of lengkap pascal

By On Thursday, April 2nd, 2015 Categories : Artikel

ALGORITME pascal :

start
input pilihan:
1. volume balok
2. Impuls
3. Momen

pilihan 1.
input : p, l dan t
proses : p*l*t
output hasil

pilihan 2
input : gaya dan lengan
proses: gaya*lengan
output hasil

pilihan 3
input : gaya dan waktu
proses : gaya*waktu
output hasil

pilihan 4
input : Pilihan tdk tersedia
end.

SOURCE CODE PASCAL :

program case_of;

uses wincrt;

var pilihan,panjang,lebar,tinggi,gaya,waktu,lengan,hasil:integer;

begin

writeln (‘this my program, dont copas :)’);

writeln;

writeln (‘Program Pengulangan’);

writeln;

writeln (‘1. Mencari volume balok’);

writeln (‘2. Mencari Impuls’);

writeln (‘3. Mencari Momen’);

writeln;

writeln (‘pilihan anda?’); readln (pilihan);

case pilihan of

1:

begin

write (‘panjang:’); readln (panjang);

write (‘lebar:’); readln (lebar);

write (‘tinggi:’);readln (tinggi);

hasil:=panjang*lebar*tinggi;

writeln;

writeln (‘hasil:’,hasil);

end;

2:

begin

write (‘gaya:’); readln (gaya);

write (‘waktu:’); readln (waktu);

hasil:=gaya*waktu;

writeln;

writeln (‘hasil:’,hasil);

end;

3:

begin

write (‘gaya:’); readln (gaya);

write (‘lengan:’); readln (lengan);

hasil:=gaya*lengan;

writeln;

writeln (‘hasil:’,hasil);

end;

else

writeln;

writeln (‘pilihan tidak tersedia’);

end;

end.

Fifty Shades of Grey (Fifty Shades, #1), Unwanted Advances: Sexual Paranoia Comes to Campus, High heels and homicide, Proper Healthy Food: Hearty vegan and vegetarian recipes for meat lovers, Bright Side (Bright Side, #1), 31 Miles: Can we ever win against ourselves?, La ballata di Iza, Him (Him #1), The Negotiator, None So Blind, Small Great Things, Unearthing Cole (Discovering Me, #1), Reclaiming Hope: Lessons Learned in the Obama White House about the Future of Faith in America, Case Histories (Jackson Brodie #1), Hell & High Water (THIRDS, #1), Room on the Broom, The Senator (Blake Jordan #1), The Chemistry of Death (Joe Tesla, #3), Before I Ever Met You, Enemy Pie