Question: Given two integer numbers, one is the number of teachers and the other is the number of apples. We want to distribute the apples evenly

Given two integer numbers, one is the number of teachers and the other is the number of apples. We want to distribute the apples evenly among them. The remaining (the indivisible) part remains in the basket. Write an algorithm using pseudocode that would display the number of apples each single teacher gets and the number of apples remaining in the basket. Translate your algorithm to python Java code.
Algorithm:
BEGIN BLOCK
DISPLAY ("Enter the number of teachers:")
teachers larr INPUTO
DISPLAY ("Enter the number of apples:")
apples larr INPUTO
apples_per_teacher larr apples / teachers
remaining_apples larr apples MOD teachers
DISPLAY ("Each teacher gets", apples_per_teacher, "apples")
 Given two integer numbers, one is the number of teachers and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!