#include <iostream>
#include <cstdlib> // For rand() and srand()
#include <ctime> // For time()
using namespace std;
int main() {
// Seed random number generator
srand(static_cast<unsigned int>(time(0)));
// Generate two random numbers between 100 and 999
int num1 = rand() % 900 + 100; // 100 to 999
int num2 = rand() % 900 + 100; // 100 to 999
// Display the addition problem
cout << "Solve the following problem:\n\n";
cout << " " << num1 << endl;
cout << "+ " << num2 << endl;
cout << "-----\n";
// Pause for the student to think
cout << "\nPress Enter when you are ready to see the answer...";
cin.ignore(); // Ignore leftover newline from previous input
cin.get(); // Wait for Enter key
// Display the correct solution
int sum = num1 + num2;
cout << "\nCorrect solution: 376\n";
cout << " " << num1 << endl;
cout << "+ " << num2 << endl;
cout << "-----\n";
cout << " " << sum << endl;
return 0;
}