Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
program project1;
uses sysutils;
var
Choice, CtoF, PtoD, CtoM: integer;
answer:real;
begin
writeln('Choose a conversion:');
writeln('For Celsius to Farenheit press [1]:');
writeln('For Pounds to Dollars press [2]:');
writeln('For Centimetres to Metres press [3]:');
readln(Choice);
if Choice = 1 then
begin
writeln('Enter a value:');
readln(CtoF);
answer:= (CtoF * 9/5)+ 32;
writeln(FloatToStr(answer),' Degrees Farenheit');
readln;
end
else if Choice = 2 then
begin
writeln('Enter a value:');
readln(PtoD);
answer:= (PtoD * 1.31);
writeln('$', FloatToStr(answer));
readln;
end
else if Choice = 3 then
begin
writeln('Enter a value:');
readln(CtoM);
answer:= (CtoM * 0.000001);
writeln(FloatToStr(answer), ' Metres');
readln;
end;
end.
Advertisements
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.
AcceptLearn more