Given temperature in °Celsius, we have to write a program to convert it in °F and print it on the screen.

To convert Celsius to Fahrenheit, we  use the given formula:

°F=95°C+32

# Algorithm

  1. Input the temperature and store it in c
  2. Calculate the temperature in Fahrenheit using the above formula and store it in f
  3. Print f
#include <iostream>
using namespace std;

int main()

{

	float celsius;

	cout << "Enter temperature in Celsius\n";	//inputting the temperature

	cin >> celsius;

	float f = (9 *celsius) / 5;	//calculating the first part of the formula

	f += 32;	//calculating the remaining part

	cout << "temperature in Fahrenheit:" << f;	//printing the calculated

}