A simple program that I wrote using Turbo Pascal that will ask the user to give the temperature in Celsius and then it will convert it in Fahrenheit equivalent.
Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My mobile number here in the Philippines is 09173084360.
Sample Program Output
Program Listing
Program celsius_to_fahrenheit;
Uses WinCrt;
Var
Choice : Char;
Celsius : Integer;
Procedure convert_fahreneheit(var celsius : integer);
Var
Fahrenheit : real;
Begin
Fahrenheit:= (9/5) * celsius + 32;
writeln('The Fahrenheit is ',Fahrenheit:8:4);
End;
Begin
Clrscr;
Choice := 'Y';
Write('Celsius To Fahrenheit Converter');
Writeln;
Writeln;
While upcase(Choice) = 'Y' Do
Begin
Writeln;
Write('Enter temperature in Celsius : ');
Readln(Celsius);
Writeln;
convert_fahreneheit(Celsius);
Write('Continue [Y/N] ');
readln(choice);
Writeln;
End;
Writeln;
Write('End of Program');
Writeln;
Readln;
End.
Uses WinCrt;
Var
Choice : Char;
Celsius : Integer;
Procedure convert_fahreneheit(var celsius : integer);
Var
Fahrenheit : real;
Begin
Fahrenheit:= (9/5) * celsius + 32;
writeln('The Fahrenheit is ',Fahrenheit:8:4);
End;
Begin
Clrscr;
Choice := 'Y';
Write('Celsius To Fahrenheit Converter');
Writeln;
Writeln;
While upcase(Choice) = 'Y' Do
Begin
Writeln;
Write('Enter temperature in Celsius : ');
Readln(Celsius);
Writeln;
convert_fahreneheit(Celsius);
Write('Continue [Y/N] ');
readln(choice);
Writeln;
End;
Writeln;
Write('End of Program');
Writeln;
Readln;
End.
No comments:
Post a Comment