#include #include using namespace std; int main() { int a, b; srand(time(0)); while (1) { a = rand() % 16; b = rand() % 16; while (1) { int c; cout << hex << uppercase << a << " + " << b << " = "; cin >> hex >> c; if (c == a + b) { cout << "Yes!" << endl; break; } else if (c != a + b) { cout << "No!" << endl; continue; } } } }