Problem Description In this problem, you will write a program that reads data pertaining two players rolling dices. The
Posted: Fri Jul 01, 2022 5:37 am
Problem Description In this problem, you will write a program that reads data pertaining two players rolling dices. The program should determine the total score obtained based on the individual rolls, and using that value identify which player wins. If both players have the same total score, otherwise they are drawn because the score obtained was equal. Input You will receive (from the user) the following as input (in order): • The number of times the dice will be rolled (e.g., 2 for rolling the dice 2 times) • The dice number obtained for each roll. [e.g., for 2 rolls, write two numbers between 1-6]. Players will roll the dice one after another. In other words, first the roll obtained by player 1 is given (i.e., 3), then the following integer is the score obtained by player 2 (e.g., 5), and so on until all the rolls happen. Processing 1. Calculate the total score based on the user input 2. Display the total score for each player 3. List which player won or if it was a drawn Examples Input 3 5 14 6 5 3 16 Output Player 1 total: 7 Player 2 total: 11 Player 2 Wins Game Player 1 total: 11 Player 2 total: 7 Player 1 Wins Game