0
How to prompt user to input data using do while without creating new separate variables for each new data set?
For example, if I wanted to get continuous user input on employee roles at a company until user input stops it, how would I do so using the do while loop?
4 Réponses
+ 1
do {
cout <<"Please enter the role:"
}while (cin>>role && role!="N")
hope it helps
0
using do while
0
so like I want to do:
do while
prompt user to continue data for another role or stop
to stop entering new role info, user must press 'N'
0
thanks for the help