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

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Courses that are developed by subject matter experts, internal or extemal to the college or university. these programs are marketed by the school (clo2) marks a)-vocational schools b)-vendor training c)-colleges & universities d)-continuing education programs
Answers: 2
question
Engineering, 04.07.2019 18:20
Inspection for bearing condition will include: (clo4) a)-color b)-smell c)-size d)-none of the above
Answers: 1
question
Engineering, 04.07.2019 19:10
The sum of the normal stresses does not change as the stress state rotates through an angle. a)-trune b)- false
Answers: 2
question
Engineering, 04.07.2019 19:10
The air in an automobile tire with a volume of 0.015 m3 is at 32°c and 140 kpa gage. determine the amount of air that must be added to raise the pressure to the recommended value of 206 kpa gage. assume the atmospheric pressure to be 128 kpa and the temperature and the volume to remain constant.[r-0.287 kj/kgk]
Answers: 3
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
Questions on the website: 13722360