Question: C++ Program The simpler the code the better! In a dice game, you get the total you roll on two dice, unless they are the

C++ Program

The simpler the code the better!

In a dice game, you get the total you roll on two dice, unless they are the same, in which case you get double what they total. Write a program that helps score the game. Read in two integers from the console. If they are different, print their sum. If they are the same, print double their sum. Hint: you are NOT programming the game, just calculating a score from the numbers that get input (presumably after the player rolls the dice).

Expected values are 4, 16, 7, 4

Given Code:

#include using namespace std;

int main() { //YOUR_CODE }

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!