kali ini saya akan mengupload program pengubah suhu / pengkorvensi suhu celcius,reamur,fahrenheit dan kelvin.
jika ingin mengunduh rumusnya bisa lansung download klik disni
untuk flowchartnya disini
berikut rumusnya:
program Konversi_Suhu;
uses crt;
label Celcius,Reaumur,Fahrenheit,Kelvin,awal,akhir;
var C,F,R,K,jumlah:real;
pilih,ulang:string;
begin clrscr;
awal:
clrscr;
textcolor(white);writeln('-----------------------------PROGRAM KONVERSI SUHU------------------------------');
textcolor(white);writeln('-------------------------------------oleh---------------------------------------');
textcolor(white);writeln('---------------------------Anak Agung Lingga Segara-----------------------------');
writeln('');
writeln('');
textcolor(white);writeln('Pilih jenis suhu: ');
writeln('');
textcolor(lightred);writeln('1.Celcius');
textcolor(yellow);writeln('2.Fahrenheit');
textcolor(lightgreen);writeln('3.Reaumur');
textcolor(lightblue);writeln('4.Kelvin');
writeln('');
textcolor(white);write('Masukkan nomor suhu pilihan (1-4) : '); readln(pilih);
if pilih='1' then goto Celcius else
if pilih='2' then goto Fahrenheit else
if pilih='3' then goto Reaumur else
if pilih='4' then goto Kelvin else goto awal;
Celcius:
clrscr;
textcolor(white);writeln('-----------------------------PROGRAM KONVERSI SUHU------------------------------');
textcolor(white);writeln('---------------------------Anak Agung Lingga Segara-----------------------------');
writeln('');
writeln('');
textcolor(lightred);writeln('Konversi Suhu Celcius');
writeln('');
textcolor(white);write('Masukkan suhu Celcius : '); readln(C);
jumlah:=C*1.8+32;
textcolor(yellow);writeln('Suhu Fahrenheit = ',jumlah:0:2);
jumlah:=C*0.8;
textcolor(lightgreen);writeln('Suhu Reaumur = ',jumlah:0:2);
jumlah:=C+273.15;
textcolor(lightblue);writeln('Suhu Kelvin = ',jumlah:0:2);
writeln('');
textcolor(white);writeln('Kembali ke menu awal? (ya/tidak)'); readln(ulang);
if ulang='ya' then goto awal else goto akhir;
Fahrenheit:
clrscr;
writeln('-----------------------------PROGRAM-KONVERSI-SUHU------------------------------');
writeln('----------------------------Anak Agung Lingga Segara------------------------------');
writeln('');
writeln('');
textcolor(yellow);writeln('Konversi Suhu Fahrenheit');
writeln('');
textcolor(white);write('Masukkan suhu Fahrenheit : '); readln(F);
jumlah:=(F-32)/1.8;
textcolor(red);writeln('Suhu Celcius = ',jumlah:0:2);
jumlah:=(F-32)/2.25;
textcolor(lightgreen);writeln('Suhu Reaumur = ',jumlah:0:2);
jumlah:=(F+459.67)/1.8;
textcolor(lightblue);writeln('Suhu Kelvin = ',jumlah:0:2);
writeln('');
textcolor(white);writeln('Kembali ke menu awal? (ya/tidak)'); readln(ulang);
if ulang='ya' then goto awal else goto akhir;
Reaumur:
clrscr;
writeln('-----------------------------PROGRAM-KONVERSI-SUHU------------------------------');
writeln('----------------------------Anak Agung Lingga Segara----------------------------');
writeln('');
writeln('');
textcolor(lightgreen);writeln('Konversi Suhu Reaumur');
writeln('');
textcolor(white);write('Masukkan suhu Reaumur : '); readln(R);
jumlah:=R/0.8;
textcolor(lightred);writeln('Suhu Celcius = ',jumlah:0:2);
jumlah:=R*2.25+32;
textcolor(yellow);writeln('Suhu Fahrenheit = ',jumlah:0:2);
jumlah:=R/0.8+273.15;
textcolor(lightblue);writeln('Suhu Kelvin = ',jumlah:0:2);
writeln('');
textcolor(white);writeln('Kembali ke menu awal? (ya/tidak)'); readln(ulang);
if ulang='ya' then goto awal else goto akhir;
Kelvin:
clrscr;
textcolor(white);writeln('-----------------------------PROGRAM KONVERSI SUHU------------------------------');
textcolor(white);writeln('----------------------------Anak Agung Lingga Segara----------------------------');
writeln('');
writeln('');
textcolor(lightblue);writeln('Konversi Suhu Kelvin');
writeln('');
textcolor(white);write('Masukkan suhu Kelvin : '); readln(K);
jumlah:=K-273.15;
textcolor(lightred);writeln('Suhu Celcius = ',jumlah:0:2);
jumlah:=K*1.8-459.67;
textcolor(yellow);writeln('Suhu Fahrenheit = ',jumlah:0:2);
jumlah:=(K-273.15)*0.8;
textcolor(lightgreen);writeln('Suhu Reamur = ',jumlah:0:2);
writeln('');
textcolor(white);writeln('Kembali ke menu awal? (ya/tidak)'); readln(ulang);
if ulang='ya' then goto awal else goto akhir;
akhir:
writeln('------------------------------ENTER-UNTUK-KELUAR--------------------------------');
writeln('---------------------------------Terimakasih------------------------------------');
readln;
end.
sekian dari program pengubah suhu di pascal
kopi kode di atas ke notepad atau ke word agar lebih gampang dibacanya
sebagai pembaca yang baik tinggalkan lah komentar anda di sini