But this is simple. Sure you've got do while working appropriate...but n1 is always going to evaluate to zero. You can thank the for loop for that.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
bool running = true; //It'll always run if set default to run.
while( running )
while(n1 > 0) //Rename n1 to something like 'number_of_items'
for( whatever )
//gotta reset n1 at some point so...
cout << "Please enter your total number of items \n";
cin >> n1;
cin >> exit?
switch on input
y: running = false;
n: running = true;
When I implement your way, It still only repeats " exit?" even if I press y or n it just repeats "exit". I'm looking to repeat the while loop and the for loop again. what it does is takes the input numbers and turns em into astrisks.
Example: user inputs 13 and groupsize 5.
the output is ***** ***** ***
after it does this I want to be able to input new numbers and a new set of groupsize after it asks the user if they want to continue.
Thank you for your help and yes my coding does suck... I'm learning from a book :c There is soo much I need to improve on.
Thanks for any amount of time you dedicate to helping a newbie!