Write a program that prompts the user for the number of tellers at Nations Bank in Hyatesville
Question:
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
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang