I have to write a code for a simple calculator that can add, subtract, multiply and divide. The conditions are that I am supposed to provide two numbers with a sign in between them, and then in the next line the answer comes up next to an equal sign. The answer also cannot be larger than 999, so whenever the result is larger than 999, there is an alert and the program terminates. I need help with the limit of 999 and terminating the program. This is what I have so far.
#include <iostream>
using namespace std;
int main()
{
int a, b, resultA, resultB, resultC, resultD, answer;
cout << "Enter a first Number: ";
cin >> a;
cout << "Enter a second Number: ";
cin >> b;