In C++ Design and implement a program that rolls two dice. Ask the user to input a number between 2 and 12. Then, roll your dice by using a random function to generate a random number representing one of the sides. Output the result of each die and the combined total of the two sides. Continue rolling the dice until the total equals what the user entered. Output the number of tries it took.
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main() {
srand(time(nullptr));
int count = 0, num, d1, d2;
cout << "Enter a number between 2 and 12: ";
cin >> num;
while (true) {
d1 = 1 + (rand() % 6);
d2 = 1 + (rand() % 6);
cout << "You rolled " << d1 << " and " << d2 << endl;
count++;
if(d1 + d2 == num) break;
}
cout << "It took " << count << " tries" << endl;
return 0;
}

In C++ Design and implement a program that rolls two dice. Ask the user to input...