subject
Engineering, 21.05.2021 14:10 prettygirl2204

Write a program that prompts the user to enter the name of a football team and its foundation year. Then for each year since the foundation year till 2020, the user should enter the number of
titles won by the team. Your program should then print the average of won titles and the best
season of the team (i. e., the year in which the team won the greatest number of titles).
Note that your program should print an error message "Invalid Input!" if the user enters a
foundation year less than 1920. Besides, the number of titles won in year X should be greater than
or equal to zero. If the user enters a negative number of titles for a year X, your program should
ask the user to re-enter the number titles won in the same year X.
Your program should display all the information needed as shown in the samples' run below.
Sample run 1
I
Enter the name of your Team: Barcelona
Enter the foundation year: 2015
Enter the number of titles won in 2015: 3
Enter the number of titles won in 2016: 2
Enter the number of titles won in 2017: 2
Enter the number of titles won in 2018: 0
Enter the number of titles won in 2019: 4
Enter the number of titles won in 2020: 1
The average of titles won is 2
The best season was in 2019. Barcelona won
4 titles
Sample run 2
Enter the name of your Team: Chelsea
Enter the foundation year: 1905
Invalid Input!
Sample run 3​

ansver
Answers: 1

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, anna22684
Water at 70°f and streams enter the mixing chamber at the same mass flow rate, determine the temperature and the quality of the exiting stream. 0 psia is heated in a chamber by mixing it with saturated water vapor at 20 psia. if both streams enters the mixing chamber at the same mass flow rate, determine the temperature and the quality of the existing system.
Answers: 2
image
Engineering, 04.07.2019 18:10, soreese02
An ideal otto cycle with air as the working fluid has a compression ratio of 8. the minimum and maximum temperatures in the cycle are 300 k and 1340 k. use constant specific heats at room temperature to determine (a) the amount of heat transferred to the air during the heat- addition kj/kg, (b) the thermal efficiency, and (c) the thermal efficiency of a carnot cycle ope limits. process, in rating between the same temperature
Answers: 2
image
Engineering, 04.07.2019 18:20, rjone8429
Asimple rankine cycle uses water as the working fluid. the water enters the turbine at 10 mpa and 480c while the condenser operates at 6 kpa. if the turbine has an isentropic efficiency of 80 percent while the pump has an isentropic efficiency of 70 percent determine the thermal efficiency
Answers: 1
image
Engineering, 04.07.2019 19:10, shayshay7874
An electric kettle is made out of stainless steel, weighs two pounds (when empty) and is equipped with a heating element that consumes 2 kw of electricity. assuming that the water and the kettle are at the same uniform temperature at any moment of time, calculate the shortest possible time to bring 2 quarts of water from room temperature to the onset of boiling
Answers: 2
You know the right answer?
Write a program that prompts the user to enter the name of a football team and its foundation year....

Questions in other subjects:

Konu
Mathematics, 27.01.2021 19:20
Konu
History, 27.01.2021 19:20