Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The function floor may be used to round numbers to a specific decimal place. The statement: y = floor(x + .5); will round the number

image text in transcribed
The function floor may be used to round numbers to a specific decimal place. The statement: y = floor(x + .5); will round the number x to the nearest integer and assign the value to y y = floor(x*10 + .5); will round the number x to the nearest tenth position and assign the value to y y = floor(x*100 +.5); will round the number x to the nearest hundredth position and assign the value to y Write a program that defines four functions to round a number x in various ways: a) roundToInteger(number) b) roundToTenths(number) c) roundToHundredths(number) d) roundToThousands (number) For each value read your program should print the original value. The program should give the option to the user what operation wants to perform. Your program should include: proper case, variable names(meaningful and use conventions) proper organization, indentation, white space, and comments Has the right inputs and outputs, computes correct results. is efficient Use a loop that gives the user the option of do another calculation or quit. Submit the .c file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions

Question

Determining how many people will lose their jobs.

Answered: 1 week ago

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago