Hello! I need to write a program that will end at certain points when data entered is invalid. For instance, if someone enters a value less than zero, an error message will show and the entire program will terminate. I can't use return (0); till the end of the program or an exit statement. I would really appreciate the help!
1 2 3 4 5 6 7
//Student will enter number of points earned
cout << "Enter the number of points you have earned: ";
cin >> points;
//Error message will show if number below 0 is entered