what about a way to just bypass enter. Like a do while loop. Like in this program
Code:
#include <iostream>
using namespace std;
int main()
{
int a,b,
cout<<"Please pick a number: ";
cin>> a;
cin.ignore();
cout<<"you chose "<< a <<" your total is "<< a;
cin.ignore();
cout<<"Please pick another number: ";
cin>> b;
cin.ignore();
cout<<"you chose "<< b <<" your total is "<< a + b;
cin.ignore();
but put something in there for a, that if a is not return, run this part again
Code:
int a,b,
cout<<"Please pick a number: ";
cin>> a;
cin.ignore();
cout<<"you chose "<< a <<" your total is "<< a;
cin.ignore();
and when it is enter, end the program.