Heres what I have so far
1) reads user input
2) assigns the input to the array
3) outputs the array
What I want it to do is count the letters in the input and ignore any spaces that might occour..then delete any repetitive characters and fill a separate array (or vector) with the key and the remaining alphabet.
CODE
include
include
include
using namespace std;
int main()
{
string myName;
cout << "Please enter your key: ";
getline(cin,myName);
string myArray[9][20];
for (int i=0; i < myName.length();i++)
myArray[0][i] = myName.at(i);
for (int i = 0; i <9; i++)
{
for(int j=0; j<myName.length(); j++)
{
cout << myArray[i][j];
}
cout << endl;
}
return 0;
}
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).