I am very new to coding, and my first project for class is to code a project that adds and multiples two numbers together, I added a third number just to take it a step further for more possible points. I am not sure what to expect for the first grading, but I assume they will try to make my program crash. When I input a letter the program goes haywire and runs the whole way through and spits out random numbers. I was wondering if there was a way to code it, so when you put in a letter it would say Error or make the program restart. I have googled, and tried many things but can't seem to make it to work. Thanks in advance.
#include <iostream>
usingnamespace std;
int main ()
{
int number_one, number_two, number_three, sum_of_numbers, product_of_nu$
cout << "Welcome to addition and multiplcation simulator.\n";
cout << "This program will give you the sum and product of two numbers.$
cout << "Press return after entering a number.\n";
cout << "Enter your first number:\n";
cin >> number_one;
cout << "Enter your second number:\n";
cin >> number_two;
sum_of_numbers = number_one + number_two;
product_of_numbers = number_one * number_two;
cout << sum_of_numbers;
cout << " is the sum of your two numbers.\n";
cout << product_of_numbers;
cout << " is the product of your two numbers.\n";
cout << "Let's take this a step further.\n";
cout << "Enter a third number:\n";
cin >> number_three;
sum_of_all = number_one + number_two + number_three;
product_of_all = number_one * number_two *number_three;
cout << sum_of_all;
cout << " is the sum of all of your numbers.\n";
cout << product_of_all;
cout << " is the product of all of your numbers.\n";
cout << "This is the end of the program.\n";
}