Question: . Problem 6: (15 points) Write a complete c program that: Declares and initializes two int variables ThreeOfAKind, Pair Does the following repeatedly o Generates
. Problem 6: (15 points) Write a complete c program that: Declares and initializes two int variables ThreeOfAKind, Pair Does the following repeatedly o Generates three random die values (each in the range 1 to 6 inclusive), and stores them into the variables d1, d2, d3 o Increments either ThreeOfAKind or Pair variable, based on the following definitions: ThreeOfAKind : all the dice have the same value Pair: exactly two of the dice have the same value Until none of the above criteria are satisfied. Displays the resulting values of the two variables in a report like fashion. Sample run: ThreeOfAKind = 2 Pair = 6 Start program code on next page
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
