Question: An app of method Math.Floor is rounding a value to the nearest integer. The statement y = Math.Floor( x + 0.5 ); will round the
An app of method Math.Floor is rounding a value to the nearest integer. The statement
y = Math.Floor( x + 0.5 );
will round the number x to the nearest integer and assign the result to y. Write an app that reads double values and uses the preceding statement to round each of the numbers to the nearest integer. For each number processed, display both the original number and the rounded number.
Step by Step Solution
3.58 Rating (155 Votes )
There are 3 Steps involved in it
To create a simple app that reads double values rounds them to the nearest integer using MathFloor and then displays both the original and rounded val... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
60618495a8c66_55260.pdf
180 KBs PDF File
60618495a8c66_55260.docx
120 KBs Word File
