1stly i'm new to C++ and i need to create a program that will calculate an average. It goes like this, a new school has been opened and it has 15 classrooms and the principal needs to divide a number of desks received from Dept of Education according to number of classrooms and whats left needs to sent back. So in my solution i have 5answers but not sure with one will have a right output
Q1. If you have 15 classrooms and you receive 57 desks, how many desks go in each classroom and how many should be sent back?
Q2. How did you arrive at your answer (ie, what math formula did you use)?
Q3. Which of the above lines of C++ code implement that formula?
number of desks per classroom = number of desks/15 (assuming number of desks per classroom is int type)
number of remaining desks = number of desks%15 (again same assumption)
EXAMPLE:
number of desks=57, number of desks per classroom=57/15=3
remaining desks=57%15=12