1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
#include <iostream> //I/O Library -> cout,endl
using namespace std;//namespace I/O stream library created
int main(int argc, char** argv) {
int pp,p1=6,p2,p3,p4,p5,p6,p7,p8,p9,a=1,p,numPlay;//players in the game
cout<<"How many players are there from 2 to 10?\n";
cin>>numPlay;
std::string name[10];//stores names
do{
cout<<"enter player "<<a<<"'s name.\n";
a=a+1;
std::cin >> name[a-1];//index goes from 0 to n-1
}while (a<numPlay+1);
return 0;
}
|