Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

THIS IS USING C++ Pay special attention to the style of your code. Indent your code correctly, choose meaningful names for your variables, define constants

THIS IS USING C++

Pay special attention to the style of your code. Indent your code correctly, choose meaningful names for your variables, define constants where needed, choose most suitable control statements, etc.

image text in transcribed

Question 5: Define the following constants const int FLOOR-ROUND = 1; const int CEILING-ROUND 2; const int ROUND = 3; Write a program that asks the user to enter a Real number, then it asks the user to enter the method by which they want to round that number (floor, ceiling or to the nearest integer) The program will then print the rounded result Your program should interact with the user exactly as it shows in the following example; Please enter a Real number: 4.78 Choose your rounding method 1. Floor round 2. Ceiling round 3. Round to the nearest whole number Implementation requirement: Use a switch statement

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

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago