vendredi 8 janvier 2021

Im having difficulty in solving this,how am i supposed to get the highest score with for loop

Design a program where the user is able to enter a set of club names of their favourite sport. The Main Functionality The program should ask the user how many clubs they want to enter. Then the user will be allowed to enter the names of at least 10 clubs, their home city, their wins, losses, and ties for the season. The program should then calculate the total points for the season for each club according to the rule that each win is worth 3 points, each tie is worth 2 points and each loss is worth 0 points. The program should display a list, the average points and display the club with the highest points in the last line of the output. After displaying the list, the user should be asked if they want to enter another set of teams. If they answer “yes” the program should clear all the data and allow the user to enter new data and redisplay the data. If the user answers anything else, the program should end with a user-friendly message. The User Interface It is your choice to use either dialogue boxes or text. The list might look like the following: Club Name City Wins Ties Losses Total points Leafs Toronto 10 5 2 40 Bruins Boston 12 3 0 42 . . . . . . . . . . . . Cunucks Vancouver 15 5 2 55 Average Points ?? The club with the highest points is the Cunucks with 15 wins, 5 ties, 2 losses and 35 points.

Aucun commentaire:

Enregistrer un commentaire