Respuesta :

Limosa

Answer:

#include<ios>// HEADER FILe

#include<iomanip> // HEADER FILE

using namespace std;// namespace  

int main() // main function

{

double tem=103.45632; // variable declaration

cout<<" The outside Temperature is:";

cout<<fixed<<setprecision(2)<<tem; // display

return 0;

}

Explanation:

The following are the description of the program.

  • set the required header files and namespaces, then declare the main method and inside the main function.
  • Set the double data type variable 'tem' and initialize the value '103.45632'.
  • Finally, print the following message and print the output through the cout that is predefined function.

Answer:

The program to this question can be described as follows:

program:

#include <iostream> //defining header file

#include <iomanip> //defining header file

using namespace std;  

int main() //defining main method

{

double outsideTemperature; //defining double variable

outsideTemperature= 103.45632; //initializing the value in variable

cout<<outsideTemperature<<": "<<setprecision(2)<<fixed<<outsideTemperature;  //print value

return 0;

}

Output:

103.456: 103.46

Explanation:

Description of the code:

In the above code first include the header file for using the "setprecision" method.  

In the next line, the main method is declared, inside the method, a double variable "outsideTemperature" is declared, that initialized with a float value.

Inside this method, "setprecision" method is called, which is the predefined method, that prints two-point value after the decimal point.