+ 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; }

22nd Aug 2018, 1:17 PM
Azat Hajyyev
Azat Hajyyev - avatar
13 Respostas
+ 3
hey aKno you know? I want to add there symbols and numbers. For example: abcde1& abcde2& abcde3& abcde4& ...
23rd Aug 2018, 12:14 AM
Azat Hajyyev
Azat Hajyyev - avatar
+ 3
got it aKno?
23rd Aug 2018, 12:15 AM
Azat Hajyyev
Azat Hajyyev - avatar
+ 3
aKno oh thank you man! Good job
23rd Aug 2018, 3:43 AM
Azat Hajyyev
Azat Hajyyev - avatar
+ 2
Hello. I don't understand the question. I understand that you are making a word from another. What do you want to do?
22nd Aug 2018, 3:42 PM
aKno
+ 2
Angel uhm no thanks;
22nd Aug 2018, 7:06 PM
Azat Hajyyev
Azat Hajyyev - avatar
+ 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.
22nd Aug 2018, 8:52 PM
aKno
+ 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;
23rd Aug 2018, 3:06 AM
aKno
+ 2
I forgot the final "}"
23rd Aug 2018, 3:10 AM
aKno
+ 2
sorry if i don't write, internet here in Cuba is expensive and I can't be coneccted too much
8th Sep 2018, 10:37 AM
aKno
+ 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
22nd Aug 2018, 8:40 PM
aKno
+ 1
aKno thanks a lot my friend
23rd Aug 2018, 6:36 PM
Azat Hajyyev
Azat Hajyyev - avatar
+ 1
You're welcome man
8th Sep 2018, 10:35 AM
aKno
+ 1
aKno are you online?
17th Sep 2018, 10:18 AM
Azat Hajyyev
Azat Hajyyev - avatar