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, 03.07.2019 14:10
Line joining liquid phase with liquid and solid phase mixture is known as: a) liquidus b) solidus c) tie line d) none of the mentioned
Answers: 2
question
Engineering, 04.07.2019 18:10
A-mn has a cubic structure with a0 0.8931 nm and a density of 7.47 g/cm3. b-mn has a different cubic structure, with a0 0.6326 nm and a density of 7.26 g/cm3. the atomic weight of manganese is 54.938 g/mol and the atomic radius is 0.112 nm. determine the percent volume change that would occur if a-mn transforms to b-mn.
Answers: 2
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
Apiston-cylinder device contains 0.1 m3 of liquid water and 0.9 m3 of water vapor in equilibrium at 800 kpa. heat is transferred at constant pressure until the temperature of water reaches 350 °c. determine (a) the quality of water at the initial state (b) the work associated with this process, (c) the heat associated with this process.
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
question
Mathematics, 06.01.2021 18:50
question
English, 06.01.2021 18:50
question
Mathematics, 06.01.2021 18:50
Questions on the website: 13722363