Write a PL/SQL program to convert a temperature in scale Fahrenheit to Celsius and vice versa.

PROGRAM:


DECLARE
F NUMBER := &FAHRENHEIT;
C NUMBER := &CELSIUS;
RESULT NUMBER;
BEGIN
RESULT := (F-32)*5/9;
DBMS_OUTPUT.PUT_LINE('FAHRENHEIT VALUE ENTERED '||F||' EQUAAL TO CELSIUS:'||''||ROUND(RESULT));
RESULT := 9/5*C+32;
DBMS_OUTPUT.PUT_LINE('CELSIUS VALUE ENTERED '||C||' EQUAL TO FAHRENHEIT :'||''||RESULT);
END;
/













Fahrenheit to Celsius:-




Celsius to Fahrenheit:-


Comments