Getting Started with the Pascal tutorial, source
Submitted By:
WEBMASTER
Rating:
(Not rated) (
Rate It)
(* Chapter 4 - Program 4 *)
(**************************************************************)
(* Centigrade to Farenheight temperature conversion *)
(* *)
(* This program generates a list of temperature conversions *)
(* with a note at the freezing point of water, and another *)
(* note at the boiling point of water. *)
(**************************************************************)
program Temperature_Conversion;
var Count,Centigrade,Farenheight : integer;
begin
Writeln('Centigrade to farenheight temperature table');
Writeln;
for Count := -2 to 12 do begin
Centigrade := 10*Count;
Farenheight := 32 + Centigrade*9 div 5;
Write(' C =',Centigrade:5);
Write(' F =',Farenheight:5);
if Centigrade = 0 then
Write(' Freezing point of water');
if Centigrade = 100 then
Write(' Boiling point of water');
Writeln;
end;
end.