Write an Ada program that determines the winner in a game of “rock, paper, scissors.” In this…

Write an Ada program that determines the winner in a game of “rock, paper, scissors.” In this…


Write an Ada program that determines the winner in a game of “rock, paper, scissors.” In this…

Write an Ada program that determines the winner in a game of “rock, paper, scissors.” In this game, two players choose simultaneously either rock, paper, or scissors. Whether a player wins or loses depends not only on that player’s choice but also on the opponent’s. The rules are: Rock breaks scissors: rock wins. Paper covers rock: paper wins. Scissors cuts paper: scissors wins. All matching combinations are ties. Your program should prompt for and read the two players’ choices and print out the winner. Your output might look something like this:

Enter the choices made by the two players

scissors rock

The second player's choice of rock beats scissors

Define and use an appropriate enumeration type for a player’s choice. Use the minimum number of comparisons to determine the winner.

Write an Ada program that determines the winner in a game of “rock, paper, scissors.” In this…