Question: please Quickly i have an exam 1. Write a program that prompts the user to enter a floating-point number and call a function called Number_Digits

please Quickly i have an exam
1. Write a program that prompts the user to enter a floating-point number and call a function called Number_Digits that return to main the number of digits before the decimal point. Call another function Approximate2Dec that will approximate this floating number value to 2 decimal places (DO NOT USE %0.2f) Here are sample runs: Your program should stop when the user enters 0 Sample: Enter a floating-point number: 154.431 The number of digits before the decimal point in 154.431 is 3 The approximated floating number with 2 decimal is: 154.43 Enter a floating-point number: 0.437 The number of digits before the decimal point in 0.431 is 1 The approximated floating number with 2 decimal is: 0.44 Enter a floating-point number: 01.4578 The number of digits before the decimal point in 1.431 is 1 The approximated floating number with 2 decimal is: 1.46 Enter a floating-point number: 0 Stopped
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
