Write a single statement that prints outsideTemperature with 4 digits. End with newline. Sample output with input 103.45632:
103.5
#include <bits/stdc++.h>
using namespace std;
main(void)
{
float temp = 123.45632;
cout<<"\nInput Temp. = "<<temp;
//Single Line Statement
cout<<setprecision(4)<<"\nOutput Temp. = "<<temp;
return(0);
}
Comments
Leave a comment