87.4k views
2 votes
Write a single statement that prints outsideTemperature with 2 digits in the fraction

User Sanjaya
by
5.3k points

1 Answer

6 votes

Answer:

outsideTemperature=108.90

Step-by-step explanation:

#include <iostream>

#include <ios>

#include <iomanip>

using namespace std;

int main()

{

double outsideTemperature = 108.90;

/* print outside temperature */

cout << setprecision(2) << fixed << outsideTemperature << endl;

return 0;

}

User Nithinpp
by
5.7k points