Answered step by step
Verified Expert Solution
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.
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 statementStep 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