PROGRAM KONVERSI SUHU DALAM PASCAL

program konversi_suhu;

uses wincrt;

var

C,R,F,K:real;

lagi:char;

begin

lagi:=’Y’;

while lagi=’Y’ do

begin

writeln(‘PROGRAM KONVERSI SUHU’);

writeln(‘———————‘);

writeln;

write(‘Nilai suhu dalam Celcius: ‘);

readln(C);

writeln;

R:=3/4*C;

F:=(5/4*C)+32;

K:=C+273;

writeln(‘Nilai suhu dalam Reamur: ‘,R:5:2);

writeln(‘Nilai suhu dalam Farenhaet: ‘,F:5:2);

writeln(‘Nilai suhu dalam Kelvin: ‘,K:5:2);

writeln;

write(‘Menghitung lagi(Y/T)? ‘);

readln(lagi);

end;

end.

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s

%d blogger menyukai ini: