Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Accept d1 and d2, the number on two dices as input. First, check to see that they are in the proper range for dice (1-6).
Accept d1 and d2, the number on two dices as input. First, check to see that they are in the proper range for dice (1-6). If not, print the message "Invalid input". Otherwise, determine the sum. If the sum is 7 or 11, print "Winner". If the sum is 2, 3 or 12, print "Loser". Otherwise print the sum. Snidmi: Input first dice: 2 Input second dice: 5 Winner Input first dice: 1 Input second dice: 1 Loser Input first dice: 3 Input second dice: 5 8 Input first dice: 7 Input second dice: 3 Invalid input Input first dice: 4 Input second dice: 5 9
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started