+ 4
Guys, how could I add to this program symbols and numbers? If you know, please help me; Thanks in advance guys!
#include <iostream> using namespace std; int main() { string characters="abcde"; int length=5; string word=""; for(int i=word.length();i<=length;i++) { for(int l=0;l<characters.length();l++) { word+=characters[l]; cout<<word<<endl; } } return 0; }
13 Answers
+ 3
hey aKno you know? I want to add there symbols and numbers. For example: abcde1&
abcde2&
abcde3&
abcde4&
...
+ 3
got it aKno?
+ 3
aKno oh thank you man! Good job
+ 2
Hello. I don't understand the question. I understand that you are making a word from another. What do you want to do?
+ 2
Angel uhm no thanks;
+ 2
I still don't understand what you want to do, I think there are a lot of ways that you can do something like that program do using symbols and numbers, that's why a asked that question.
+ 2
//Ok, following that pattern:
#include <iostream>
using namespace std;
int main() {
string characters="abcde";
char number = '1';
char symbol = '&';
int length=5;
string word="";
for(int i=word.length();i<=length;i++)
{
for(int l=0;l<characters.length();l++)
{
word+=characters[l];
cout<<word<<endl;
}
word += number++;
cout << word << endl;
word += symbol;
cout << word << endl;
}
return 0;
+ 2
I forgot the final "}"
+ 2
sorry if i don't write, internet here in Cuba is expensive and I can't be coneccted too much
+ 1
Sorry, man. I just finish my 2nd year of Informatic Engineering, I still have to continue learning, and English is not my native language. Greetings
+ 1
aKno thanks a lot my friend
+ 1
You're welcome man
+ 1
aKno are you online?