Hello(repost)-
I am reposting because I didn't get the answer I needed. My teacher gave us this problem in a lab and I need help with it. Basically, he wants us to write an algorithm to count symbols. The user will provide anywhere between 3-10 symbols and then an initial number. For example:
user: 01234567, initial number: 106
output: 107, 110, 111, 112, 113, 114, 115, 116, 117, 120, 121.
user: abc, initial number: bb
output: bc, ca, cb, cc, aa, ab, ac, etc.
now after wracking my brain for the past 24 hours, i have thought to put the characters in a string, then have the initial number in another string. Then use a for loop, if statements to compare. If someone were to input "abcd" and an initial number of "bc" the output should look something like bc, ca, cb, cc, aa(startover), ab, ac, ba, bb, bc. Here is my code so far but does anyone have any good ideas for this(btw-I am a newbie at C++ so please be as specific as possible):
char symbol[10];
char initial[5];
cout<<"Input the symbols: "<<endl;
cout<<"Input your initial number: "<<endl;
cin>>symbol;
cin>>initial;
for(int i=3;i>-1;i--)
{cout<<initial[i+1];}
return 0;