cari ajah disini

Minggu, 21 Maret 2010

konversi suhu nomor 5 pascal



uses crt;
var
f,k,c,r,pil : integer;
menu : string;
label awal,akhir,tengah;
begin
awal:
clrscr;
writeln('===KONVERSI SUHU===');
writeln('1.celcius ke fahrenheit');
writeln('2.celcius ke kelvin');


writeln('3.clcius ke reamur');
writeln('4.exit');
writeln('masukkan jenis pilihan anda = ');readln(pil);
case pil of

1:begin
clrscr;
writeln('celcius ke fahrenheit ');
write ('masukkan nilai celcius = ');readln(c);
f := 9 mod 5 * c + 32 ;
writeln(c,' derajat celcius = ',f,' derajat fahrenheit');
readln;
end;
2:begin
clrscr;
writeln('celcius ke kelvin');
write('masukkan nilai celcius = ');readln(c);
k := c + 273;
writeln(c,' derajat celcius = ',k,' derajat kelvin');
readln;
end;
3:begin
clrscr;
writeln('celcius ke reamur');
write('masukkan angka celcius = ');readln(c);
r:= 4 mod 5 * c ;
writeln(c,' derajat celcius = ',r,' derajat reamur');
readln;
end;
4:begin
akhir:
clrscr;
writeln('exit');
gotoxy(32,12);writeln('terimakasih');
readln;
goto tengah;
end;
else
writeln('tidak ada menu');
end;
write('apakah anda ingin kembali ke menu y/t = ');readln(menu);
if menu = 'y' then
goto awal
else
goto akhir;
readln;
tengah:
end.










Tidak ada komentar:

Posting Komentar