โ Back to User Input
Question 343
Read Two Doubles and Print Average
Read Two Doubles and Print Average
Read two floating-point numbers from input (separated by a space or newline) and print their average with exactly 2 decimal places. For example, if the input is: 10 20 print: 15.00 Use<iomanip>withfixedandsetprecision(2).
Expected Output:
15.00
Topics:
User Input
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.