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, johnthienann58
Thermal stresses are developed in a metal when its a) initial temperature is changed b) final temperature is changed c) density is changed d) thermal deformation is prevented e) expansion is prevented f) contraction is prevented
Answers: 2
image
Engineering, 04.07.2019 18:10, Tyrant4life
Draw the engineering stress-strain curve for (a) bcc; (b) fcc metals and mark important points.
Answers: 1
image
Engineering, 04.07.2019 18:10, chadatkin
Which of the following ziegler nichols tuning methods the response of the controller to a step input should exhibit an s-shaped curve? a)-open loop mode b)-closed loop mode c)-both modes (open & closed) d)-none of the modes (open & closed)
Answers: 3
image
Engineering, 04.07.2019 18:20, krojas015
Asolid cylinder is concentric with a straight pipe. the cylinder is 0.5 m long and has an outside diameter of 8 cm. the pipe has an inside diameter of 8.5 cm. the annulus between the cylinder ad the pipe contains stationary oil. the oil has a specific gravity of 0.92 and a kinematic viscosity of 5.57 x 10-4 m2/s. most nearly, what is the force needed to move the cylinder along the pipe at a constant velocity of 1 m/s?
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 in other subjects:

Konu
Mathematics, 01.07.2019 16:50
Konu
Mathematics, 01.07.2019 16:50