Table of Contents
Overview
Below is the QBASIC program to ask the temperature in Celcius from the user and convert it into Fahrenheit.
REM Program to convert temperature in celcius to fahrenheit
CLS
INPUT "Enter the temperature in celcius: "; C
F = C * (9/5) + 32
PRINT "Temperature in fahrenheit is: "; F
END
Output
Explanation
Let’s first see the formula: F = C * (9/5) + 32. To calculate the temperature in Fahrenheit, first, accept the temperature in celcius from the user and add the product of C and (9/5) with 32.
More Programs
https://thinkshare.one/learn/programming/qbasic/