The Program in C++ to Convert temperature in Celsius to Fahrenheit is given below:
#include <iostream>
using namespace std;
int main() {
double celsius, fahrenheit;
cout << "Enter temperature in Celsius: ";
cin >> celsius;
fahrenheit = (celsius * 9/5) + 32;
cout << "Temperature in Fahrenheit: " << fahrenheit << endl;
return 0;
}
Output:
Enter temperature in Celsius: 99
Temperature in Fahrenheit: 210.2
Pro-Tips💡
In this program, the user is prompted to enter a temperature in Celsius.
This temperature is then stored in the variable celsius
.
The temperature is then converted to Fahrenheit using the formula fahrenheit = (celsius * 9/5) + 32
.
The resulting temperature in Fahrenheit is then displayed on the screen.
Learn C-Sharp ↗
C-sharp covers every topic to learn about C-Sharp thoroughly.
Learn C Programming ↗
C-Programming covers every topic to learn about C-Sharp thoroughly.
Learn C++ Programming↗
C++ covers every topic to learn about C-Sharp thoroughly.