Fixed Precision Output
You are given a floating-point number N. Print the number rounded to two decimal places.
Use formatting to ensure the output always shows exactly two digits after the decimal point.
Example 1:
Input: N = 4.2938
Output: 4.29
Example 2:
Input: N = 7.4
Output: 7.40
Still unsure what the problem is asking ?
Let’s go through a few more examples, step by step, to make it clearer.
Example 3:
Input: N = 6.7598
Output: 6.76
Constraints:
- 0 ≤ N ≤ 100
- N is a floating-point number.