Program to convert Celsius to Fahrenheit in C++

Write a Program to convert Celsius to Fahrenheit in C++.

This program is really simple just use the following formula to get the temperature converted into Fahrenheit.

Fahrenheit = (1.8 * celsius) + 32

 

PROGRAM:

#include <iostream>
using namespace std;

int main()
{
    float celsius;
    float fahrenheit;

    cout << "Enter Celsius temperature: ";
    cin >> celsius;
    fahrenheit = (1.8 * celsius) + 32;
    cout << "Fahrenheit = " << fahrenheit << endl;

    return 0;
}

 

OUTPUT:

convert fahrenheit to celsius in c++

 

To Convert Fahrenheit to Celsius:

Program to convert Fahrenheit to Celsius

Leave a Comment