Tugas 3 :
program suhu;
uses crt;
var
K : real ;
Pilihan : integer;
begin
Repeat;
clrscr;
Writeln('KONVERSI KELVIN');
Writeln('===============');
Writeln;
Writeln('Pilihan Suhu: ' );
Writeln('[1]. Celcius' );
Writeln('[2]. Fahrenheit');
Writeln('[3]. Rankine' );
Writeln('[4]. Delisle' );
Writeln('[5]. Newton' );
Writeln('[6]. Reaumur' );
Writeln('[7]. Romer' );
Writeln('[8]. Keluar' );
Write('Masukkann Pilihan Anda [1-8] : ');Readln(Pilihan);
Writeln;
Case Pilihan Of
1:begin
Clrscr;
Writeln('=================');
Writeln('KELVIN => CELCIUS');
Writeln('=================');
Writeln;
Write('Jumlah Yang Ingin Di Konversikan :');Readln(K);
K:=K-273.15;
Writeln('Hasil : ',K:5:2,'C');
Writeln('Tekan Enter Untuk Kembali');
Readln;
end;
2:begin
Clrscr;
Writeln('====================');
Writeln('KELVIN => FAHRENHEIT');
Writeln('====================');
Writeln;
write('Jumlah Yang Ingin Di Konversikan : ');readln(K);
K:=K*1.8-459.67;
Writeln(' Hasil : ',K:5:2,'F');
Writeln('Tekan Enter Untuk Kembali');
Readln;
end;
3:begin
Clrscr;
Writeln('=================');
Writeln('KELVIN => RANKINE');
Writeln('=================');
Writeln;
Write('Jumlah Yang Ingin Di konversikan : ');readln(K);
K:=K*1.8;
Writeln('Hasil : ',K:5:2,'Ra');
Writeln('Tekan Enter Untuk Kembali');
Readln;
end;
4:begin
Clrscr;
writeln('=================');
Writeln('KELVIN => DELISLE');
Writeln('=================');
Writeln;
Write('Jumlah Yang Imgim Di Konversiksan : ');readln(K);
K:=(373.15-K)*1.5;
Writeln('Hasil : ',K:5:2,'De');
Writeln('Tekan Enter Untuk Kembali');
Readln;
end;
5:begin
Clrscr;
Writeln('================');
Writeln('KELVIN => NEWTON');
Writeln('================');
Writeln;
Write('Jumlah Yang Ingin Di KOnversikan : ');readln(K);
K:=(K-273.15)*33/100;
Writeln('Hasil : ',K:5:2,'N');
Writeln('Tekan Enter Untuk Kembali');
Readln;
end;
6:begin
Clrscr;
Writeln('=================');
Writeln('KELVIN => REAUMUR');
Writeln('=================');
Writeln;
Write('Jumlah Yang Ingin Di Konversikan : ');readln(K);
K:=(K-273.15)*0.8;
Writeln('Hasil : ',K:5:2,'Re');
Writeln('Tekan Enter Untuk Kembali');
Readln;
end;
7:begin
Clrscr;
Writeln('===============');
Writeln('KELVIN => ROMER');
Writeln('===============');
Writeln;
Write('Jumlah Yang Ingin Di Konversikan : ');readln(K);
K:=(k-273.15)*21/40+7.5;
Writeln('Hasil : ',K:5:3,'Ro');
Writeln('Tekan Enter Untuk Kembali');
Readln;
End;
8:Exit;
end;
until Pilihan=8;
End.
Tidak ada komentar:
Posting Komentar