I am very new to programming and was given a HW assignment in which I am to use ceil(), floor(), and round() functions for a real number (4.78). I understand how these functions work in that it rounds up or down but I do not under stand why the HW asks that we assign a const int value to to theses functions. The assignment is below. How does assigning const int value to the floor, ceiling and round help me solve this problem?
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
2
5
Any help on this would be so useful cause I do not know where to start given that we are using a const int that to me do not relate to the real number 4.78