Question: Write a program that prompts the user for the number of tellers at Nations Bank in Hyatesville that worked each of the last three years.

Write a program that prompts the user for the number of tellers at Nation’s Bank in Hyatesville that worked each of the last three years. For each worker the program should ask for the number of days out sick for each of the last three years. The output should provide the number of tellers and the total number of days missed by all the tellers over the last three years.
See the sample output below.
Sample Run:
How many tellers worked at Nation’s Bank during each of the last three years ?
2
How many days was teller 1 out sick during year 1?
5
How many days was teller 1 out sick during year 2?
8
How many days was teller 1 out sick during year 3?
2
How many days was teller 2 out sick during year 1?
1
How many days was teller 2 out sick during year 2?
0
How many days was teller 2 out sick during year 3?
3
The 2 tellers were out sick for a total of 19 days during the last three years

He also wants us to calculate running total for each inner for loop, using this as a reference:
for i=1 to teller
for j=1 to num_year
cin>> sick_days
tottalsick_days+=sick_days
endinnerfor
endouterfor

Step by Step Solution

3.27 Rating (150 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure lets break down the problem and write the program stepbystep Steps to Develop the Program 1 Prompt for Number of Tellers Get the number of teller... View full answer

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 Programming Questions!