How do I add in cin to every cout that I do in my do while loop
I want to make it so that whatever number of players I put it will ask "enter player " a "'s name." then you would have to enter p1, then it loops and then asks p2 and so on depending on how many players were said there are.
#include <iostream>
usingnamespace std;
int main(int argc, char** argv) {
int a=1,numPlay,p1,p2,p3,p4,p5,p6,p7,p8,p9;
cout<<"How many players are there from 2 to 10?\n";
cin>>numPlay;
do{
cout<<"enter player "<<a<<"'s name.\n";
a=a+1;
}while (a<numPlay+1);
return 0;
}