โ Back to Printing
Question 313
Rounded to Whole Number
Rounded to Whole Number
Adouble x = 3.7is given. Print it rounded to a whole number with no decimal point: 4 Use<iomanip>withfixedandsetprecision(0).
Expected Output:
4
Topics:
Printing
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cout, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.