procedure
TFKonversi.BKonversiClick(Sender: TObject);
var a:real;
begin
a:=strtofloat(LEInput.Text);
case CBKonversi.ItemIndex of
0:LEOutput.Text:=floattostr(a-273.15);
//Kelvin to Celcius
1:LEOutput.Text:=floattostr(a*1.8-459.67); //Kelvin to Fahrenheit
2:LEOutput.Text:=floattostr(a*1.8); //Kelvin to Rankine
3:LEOutput.Text:=floattostr((373.15-a)*1.5); //Kelvin to Delisle
4:LEOutput.Text:=floattostr((a-273.15)*0.33); //Kelvin to Newton
5:LEOutput.Text:=floattostr((a-273.15)*0.8); //Kelvin to Reamur
6:LEOutput.Text:=floattostr((a-273.15)*0.525+7.5); //Kelvin to Romer
7:LEOutput.Text:=floattostr(a+237.15); //Celcius to Kelvin
8:LEOutput.Text:=floattostr(a*1.8+32); //Celcius to Fahrenheit
9:LEOutput.Text:=floattostr(a*1.8+491.67); //Celcius to Rankine
10:LEOutput.Text:=floattostr((100-a)*1.5); //Celcius to Delisle
11:LEOutput.Text:=floattostr(a-0.33); //Celcius to Newton
12:LEOutput.Text:=floattostr(a*0.8); //Celcius to Reamur
13:LEOutput.Text:=floattostr(a*0.525+7.5); //Celcius to Romer
14:LEOutput.Text:=floattostr((a+459.67)/1.8); //Fahrenheit to Kelvin
15:LEOutput.Text:=floattostr((a-32)/1.8); //Fahrenheit to Celcius
16:LEOutput.Text:=floattostr(a+459.67); //Fahrenheit to Rankine
17:LEOutput.Text:=floattostr((212-a)*0.83); //Fahrenheit to Delisle
18:LEOutput.Text:=floattostr((a-32)*0.183); //Fahrenheit to Newton
19:LEOutput.Text:=floattostr((a-32)/2.25); //Fahrenheit to Reamur
20:LEOutput.Text:=floattostr((a-32)*(7/24)+7.5); //Fahrenheit to Romer
21:LEOutput.Text:=floattostr(a/1.8); //Rankine to Kelvin
22:LEOutput.Text:=floattostr(a/1.8+273.15);
//Rankine to Celcius
23:LEOutput.Text:=floattostr(a-459.67); //Rankine to Fahrenheit
24:LEOutput.Text:=floattostr((671.67-a)*0.83); //Rankine to Delisle
25:LEOutput.Text:=floattostr((a-491.67)*0.183); //Rankine to Newton
26:LEOutput.Text:=floattostr((a/1.8+273.15)+0.8); //Rankine to Reamur
27:LEOutput.Text:=floattostr((a-491.67)*(7/24)+7.5); //Rankine to
Romer
28:LEOutput.Text:=floattostr((373.15-a)*0.67); //Delisle to Kelvin
29:LEOutput.Text:=floattostr((100-a)*0.67);
//Delisle to Celcius
30:LEOutput.Text:=floattostr((212-a)*1.2); //Delisle to Fahrenheit
31:LEOutput.Text:=floattostr((671.67-a)*1.2); //Delisle to Rankine
32:LEOutput.Text:=floattostr((33-a)*0.22); //Delisle to Newton
33:LEOutput.Text:=floattostr((80-a)*0.53); //Delisle to Reamur
34:LEOutput.Text:=floattostr((60-a)*0.35); //Delisle to Romer
35:LEOutput.Text:=floattostr(a*(100/33)+273.15); //Newton to Kelvin
36:LEOutput.Text:=floattostr(a*(100/33)); //Newton to Celcius
37:LEOutput.Text:=floattostr(a*5.45+32); //Newton to Fahrenheit
38:LEOutput.Text:=floattostr(a*5.45+491.67); //Newton to Rankine
39:LEOutput.Text:=floattostr((33-a)*4.54); //Newton to Delisle
40:LEOutput.Text:=floattostr(a*2.42); //Newton to Reamur
41:LEOutput.Text:=floattostr(a*(35/22)+7.5); //Newton to Romer
42:LEOutput.Text:=floattostr(a/0.8+273.15); //Reamur to Kelvin
43:LEOutput.Text:=floattostr(a/0.8); //Reamur to Celcius
44:LEOutput.Text:=floattostr(a*2.25+32); //Reamur to Fahrenheit
45:LEOutput.Text:=floattostr(a*2.25+491.67); //Reamur to Rankine
46:LEOutput.Text:=floattostr((80-a)*1.875); //Reamur to Delisle
47:LEOutput.Text:=floattostr(a*0.4125); //Reamur to Newton
48:LEOutput.Text:=floattostr(a*(21/32)+7.5); //Reamur to Romer
49:LEOutput.Text:=floattostr((a-7.5)*(40/21)+273.15); //Romer to
Kelvin
50:LEOutput.Text:=floattostr((a-7.5)*(40/21)); //Romer to Celcius
51:LEOutput.Text:=floattostr((a-7.5)*(24/7)+32);
//Romer to Fahrenheit
52:LEOutput.Text:=floattostr((a-7.5)*(24/7)+491.67); //Romer to
Rankine
53:LEOutput.Text:=floattostr((60-a)*(20/7)); //Romer to Delisle
54:LEOutput.Text:=floattostr((a-7.5)*(22/35)); //Romer to Newton
else
LEOutput.Text:=floattostr((a-7.5)*(32/21)); //Romer to Reamur
end;
end;
|