Question
C__ Creating Function Exercise 5.10 (Rounding Numbers) An application of function floor is rounding a value to the nearest integer. The statement y = floor(
C__ Creating Function Exercise 5.10
(Rounding Numbers) An application of function floor is rounding a value to the nearest integer. The statement y = floor( x + .5 ); will round the number x to the nearest integer and assign the result to y. Write a program that reads several numbers and uses the preceding statement to round each of these numbers to the nearest integer. For each number processed, print both the original number and the rounded number.
1. Create the function header first!!!! 2. Within each function try to use //in line comments to pseudo code each function before start coding.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started