Question: Write a program using c++ language. Alice and Bob are playing a game with dices. Each player throws a dice three times and the winner

Write a program using c++ language.

Alice and Bob are playing a game with dices. Each player throws a dice three times and the winner is the one who has more odd numbers when comparing the corresponding three results. Let (a0, a1, a2) and (b0, b1, b2) represent the numbers Alice and Bob got in the three throws, respectively. The points for each player is calculated as follows: if ai is even and bi is odd, Bob got one point. if ai is odd and bi is even, Alice got one point. if ai and bi are both even or odd, no one got points. write a program that reads the results of throws of each player and decide the final winner. Constraints none Input Format Six space separated values, the first three integers a0, a1, a2 representing Alice numbers, and the second three integers b0, b1, b2 representing Bob numbers. Output Format Print out the points Alice and Bob got separated by a space. Then print after a space "Alice is the winner" or "Bob is the winner" or "Tie" based on the result Sample #1 Input 2 3 4 5 6 2 Output 1 1 Tie Sample #2 Input 1 2 3 4 5 6 Output 2 1 Alice is the winner Sample #3 Input 6 5 2 3 2 1 Output 1 2 Bob is the winner

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!