Is there any Method to change a to z alphabets into Names(add by user and names more than ten or more :) is there any method to add easily names without consuming time because tomorrow is my project Exam and i need you to change code and give me better ideas to change code myself
PS : PLEASE DO NOT USE THIS CODE FOR SCHOOL PROJECT BECAUSE COPY IS NOT A SOLUTION TO PASS IN PROGRAMMING LEARNING IS POWER
example
Enter Number 1 : John
Enter Number 2 : Tony Stark
Enter Number 3 : Steve Job
John Killed Steve and Tony Killed John and Tony is the winner :)
yahoooo!!!!
----------------------------------------------------------------
using namespace std;
void KillChar(char* temp, int index);
int main()
{
string name;
cout << "Enter Person 1 Name : ";
cin >> name;
string name2;
cout << "Enter Person 2 Name :";
cin >> name2;
{
cout << "length of first name = " << name.length() << endl;
cout << "length of 2 name = " << name2.length() << endl;
}
int NumberofPeople;
int skip;
int Suvivors = 0;
int FinalSuvivors = 0;
int Next_Person = 0;
int Starting_Point = 0;
int Current_Point = 0;
char People[] = "abcdefghijklmnopqrstuvwxyz";
int choice;
bool gameOn = true;
while (gameOn != false)
{
cout << "\tJosephus Problem\n" << endl;
switch (choice)
{
case 1:
cout << "game start!\n";
break;
}
cout << "Enter Number of People: ";
cin >> NumberofPeople;
while (NumberofPeople > 26)
{
cout << "ERROR: The Number of People is Too Big." << endl;
cout << "Number of People Can Not Be No More than 26 (a thru z)" << endl;
cout << "Enter Number of People: ";
cin >> NumberofPeople;
}
cout << "Skip Number Can Not Be No More than 25." << endl;
cout << "Enter Skip Number: ";
cin >> skip;
while (skip > 25)
{
cout << "ERROR: The Skip Number is Too Big." << endl;
cout << "Skip Number Can Not Be No More than 25." << endl;
cout << "Enter Skip Number: ";
cin >> skip;
}
cout << "People: ";
for (int i = 0; i < NumberofPeople; i++)
{
Suvivors++;
cout << People[i];