PRACTICAL-6
OBJECT: Write a generalized program
to Convert.
(a) Fahrenheit into Centigrade
10 REM * PROGRAM TO
CONVERT TEMPERATURE *
20 CLS
30 INPUT “ENTER TEMPERATURE IN FAHRENHEIT___”; F
40 C = 5 / 9 *
(F-32)
50 CLS
60 PRINT ; F;
“FAHRENHEIT IS EQUAL TO”; C; “CENTIGRADE”
70 END
|
(b) Centigrade into Fahrenheit
10 REM * PROGRAM TO
CONVERT TEMPERATURE *
20 CLS
30 INPUT “ENTER TEMPERATURE IN CENTIGRADE ___”; C
40 F = 9 / 5 * C +
32
50 CLS
60 PRINT ; C;
“CENTIGRADE IS EQUAL TO”; F; “FAHRENHEIT”
70 END
|
0 comments:
Post a Comment