- 1

I don't understand this can someone explain this to me?

You are an administrator at a football club who must categorize already played games on the team's website. The given program takes 3 inputs: 1. match status - which checks if the match is suspended ("true") or not suspended ("false") 2. your team's score 3. opposing team's score. Complete the program so that if the match is suspended (the 1st input is "true"), it will output "Suspended". If the match is not suspended ( the1st output is false), the following statuses should be set depending on the match result: "Won", "Lost" and "Draw". Sample Input false 3 2 Sample Output Won

17th Oct 2021, 5:26 AM
Lokesh devda
Lokesh devda - avatar
3 Answers
+ 1
If the first input is false, print "suspended" and exit the program Else, take in the next 2 inputs, and check wheather your team won or lost or its a draw match, based on the scores of the 2 teams
17th Oct 2021, 5:57 AM
Rishi
Rishi - avatar
+ 1
Lokesh devda The given program takes 3 inputs 1 - match status 2 - your team's score 3 - opposite team's score So first you have to match status if it is suspended means status is true then print "Suspended" and don't do other things. 2nd if your team's score is more than opposite team's score then print "Won" 3rd if your team's score is less than opposite team's score then print "Lost" 4th if both team's score is same then print "Draw"
17th Oct 2021, 6:01 AM
A͢J
A͢J - avatar
+ 1
17th Oct 2021, 6:49 AM
Lokesh devda
Lokesh devda - avatar