Discover the answers you need at Westonci.ca, a dynamic Q&A platform where knowledge is shared freely by a community of experts. Our Q&A platform offers a seamless experience for finding reliable answers from experts in various disciplines. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.

Write a program that asks the user for a temperature in degrees Celsius.

Then display the temperature in Celsius and its Fahrenheit equivalence to two decimal places.


Sagot :

Answer:

#include <iostream>

#include <iomanip>

using namespace std;

int main(){

  double celsius, fahrenheit

 

  cout << "Enter the emperature in degrees Celsius: ";

  cin >> celsius;

  cout << endl;

  fahrenheit = (celsius * 9/5) + 32;

  cout << fixed << setprecision(2) << fahrenheit;

}

Explanation: