I'm writing a function that take a date from the user in the form DD/MM/YYYY, I want the user to enter the numbers only and the program print /.
I've wrote a code that show a massage prompt the user to enter the date and store the day , month and year in separate variable.
int day;
int month;
int year;
cout << "Enter your birthday date: "
cin >> day;
cout << "/";
cin >> month;
cout << "/";
cin >> year;
what I want is when the user enter the day witch is 2 digit number the program automatically move to the next line and print / so the user enter the next input without pressing enter. But the code I have wrote require pressing enter after each input.