You might want to check your while condition!
Since the conditions are in the negation, you would use AND ( && ) instead of OR (||) to combine them.
EDIT:
And as pointed out, you ought to be comparing Die1 and Die2 to numbers. If you’d like to keep the characters as is, you could add character ‘0’ to the sum of Die1 and Die2.
This seems to work fine:
#include <bits/stdc++.h>
using namespace std;
int main() {
int Die1, Die2;
cout << "Die 1: ";
cin >> Die1;
cout << "Die 2: ";
cin >> Die2;
while ( (Die1+Die2 != 2)&&(Die1+Die2 != 3)&&(Die1+Die2 != 5)&&(Die1+Die2 != 7)&&(Die1+Die2 != 9)&&(Die1+Die2 != 11)) {
cout << "You Rolled a " <<Die1<< " and " <<Die2<< " for a Total of " <<Die1 + Die2<<". Please Roll Again\n";
cout << "Die 1: ";
cin >> Die1;
cout << "Die 2: ";
cin >> Die2;
}
}
1
solved While loop runs when false