Complete the following C++ program. The program should compute and output the Celsius value corresponding to the given Fahrenheit value.
//************************************************
// Celsius program
// This program outputs the Celsius temperature
// corresponding to a given Fahrenheit temperature
//************************************************
#include <iostream>
using namespace std;
int main()
{
const float fahrenheit = 72.0;
float celcius = (5.0/9.0)*(fahrenheit-32)
then just output the values needed
To complete the C++ program that computes the Celsius value corresponding to the given Fahrenheit value, you need to add the necessary code for the calculations and output. Here's how you can do it:
```cpp
#include <iostream>
using namespace std;
int main()
{
const float fahrenheit = 72.0;
float celsius;
// Conversion formula: Celsius = (Fahrenheit - 32) * 5/9
celsius = (fahrenheit - 32) * 5 / 9;
// Output the Celsius value
cout << "Celsius value: " << celsius << endl;
return 0;
}
```
In this program, we declare a variable `celsius` to store the calculated Celsius value. We then use the conversion formula `Celsius = (Fahrenheit - 32) * 5/9` to calculate the Celsius value corresponding to the given Fahrenheit value. Finally, we output the result using `cout`. The `endl` is used to insert a line break after the output.
When you run the program, it will compute and output the Celsius value corresponding to the given Fahrenheit value, which in this case is 22.2222.