← Back to User Input
Question 188
Read and Round a Float
Read and Round a Float
Read one decimal number from standard input and print it back rounded to exactly two decimal places. Even if the input has fewer decimals (or none), your output must always show two digits after the decimal point. Use the %.2f format specifier to control the number of decimals.Expected Output:
3.14= newline. No newline after the last line.
Hints2 available
Sign in to use hintsTopics:
User Input
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.