. Write a program given a number in any base (base 2 to base 16) and rounds that number to a

. Write a program given a number in any base (base 2 to base 16) and rounds that number to a

. Write a program given a number in any base (base 2 to base 16) and rounds that number to a

specified place. Rounding up occurs when the digit to the right of the rounding place divided by the

number’s base is 0.5 or more. For example, 0.12468 rounded to 3 places is 0.125 because 6 divided by

8 is greater than 0.5; when rounded to 2 places, it’s 0.13 because 4 divided by 8 is 0.5; and it’s 0.1

when rounded to 1 place because 2 divided by 8 is less than 0.5. Input from the keyboard three (3)

values: a number, the base of that number, and the number of places to be rounded. Assume the

numbers entered will have at least one digit to the right of the place to be rounded and at least one digit

to the left of the decimal point. Also, assume the rounding place will never be 0 (round a whole

number). For each input, output to the screen the number rounded to the given number of places. Do

not output any digits beyond the rounded place. Finally, ask the user if he/she wishes to run the

program again (check case). Refer to the sample output below.

Sample Run:

Enter the value: 0.11101

Enter the base of the number: 2

Number of decimal places to round: 4

The resulting value: 0.1111

Run again (Y/N): y

Enter the value: 35.4321

Enter the base of the number: 7

Number of decimal places to round: 3

The resulting value: 35.432

Run again (Y/N): N

"96% of our customers have reported a 90% and above score. You might want to place an order with us."

Essay Writing Service
Affordable prices

You might be focused on looking for a cheap essay writing service instead of searching for the perfect combination of quality and affordable rates. You need to be aware that a cheap essay does not mean a good essay, as qualified authors estimate their knowledge realistically. At the same time, it is all about balance. We are proud to offer rates among the best on the market and believe every student must have access to effective writing assistance for a cost that he or she finds affordable.

Caring support 24/7

If you need a cheap paper writing service, note that we combine affordable rates with excellent customer support. Our experienced support managers professionally resolve issues that might appear during your collaboration with our service. Apply to them with questions about orders, rates, payments, and more. Contact our managers via our website or email.

Non-plagiarized papers

“Please, write my paper, making it 100% unique.” We understand how vital it is for students to be sure their paper is original and written from scratch. To us, the reputation of a reliable service that offers non-plagiarized texts is vital. We stop collaborating with authors who get caught in plagiarism to avoid confusion. Besides, our customers’ satisfaction rate says it all.

© 2022 Homeworkcrew.com provides writing and research services for limited use only. All the materials from our website should be used with proper references and in accordance with Terms & Conditions.

Scroll to Top