Write a program that converts temperatures in the Celsius scale to temperatures in the Fahrenheit scale. Your program should ask the user to supply the Celsius temperature, and convert the temperature entered to degrees Fahrenheit using the formula Fahrenheit = 1.8 * Celsius + 32. It should then display the Fahrenheit temperature.

Respuesta :

Answer:

#include <iostream>

using namespace std;

int main()

{

   float celsius;

  cout<<"Enter the temperature in Celsius: ";

  cin>>celsius;

 

  float Fahrenheit  = 1.8 * celsius + 32;

  cout<<"The temperature in Fahrenheit  is: "<<Fahrenheit<<endl;

}

Explanation:

first include the library iostream in the c++ programming.

Then, create the main function and declare the variable celsius.

cout is used to print the message on the screen.

cin is used to store the user enter value in the variable.

then, apply the formula for calculating the temperature in Fahrenheit

and store the result in the variable.

Finally, print the result.