CJCoding With Joseph

Rounded to Whole Number

A double x = 3.7 is given. Print it rounded to a whole number with no decimal point:

4

Use <iomanip> with fixed and setprecision(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.