*/
Looking for work? Check out our jobs area.
*/

View \TEMPCONV.PAS

This is the second disk of the PASCAL TUTOR system. It has the

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.

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.