Challenge for proffisional | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Challenge for proffisional

How to make program IN C++ that put letters (from user) bettwen every number (from user) ... for example : input L and 386829273 output 3L8L6L8L2L9L2L7L3 I know that program not useful but i really want to learn NOTE : THE PROGRAM IN C++ 🌋

23rd Jun 2018, 6:14 PM
Mohammad Alshareef
Mohammad Alshareef - avatar
9 Antworten
+ 3
delcare and initialize an empty string a for loop that runs the length of the numerical input += the number at the for loop index forcing it to be a char if needed into the empty string += the letter input into the empty string if you are woried about the trailing letter in the output, then reduce the condition of the loop counter by 1.
23rd Jun 2018, 6:26 PM
sharpProgrammer
sharpProgrammer - avatar
23rd Jun 2018, 6:55 PM
Nikhil Dhama
Nikhil Dhama - avatar
0
Please write the code .... i cant understand 😐
23rd Jun 2018, 6:34 PM
Mohammad Alshareef
Mohammad Alshareef - avatar
0
Nikhil Dhama Gooooooooood job you are really BRO WELLDONE 👍👍👍
23rd Jun 2018, 7:18 PM
Mohammad Alshareef
Mohammad Alshareef - avatar
0
Ace i am really very starter in c++ and i know a little commands just tell me the commands that i need in this program to see if i can do it
23rd Jun 2018, 7:19 PM
Mohammad Alshareef
Mohammad Alshareef - avatar
0
Here's a less clever, but safer approach. https://code.sololearn.com/cG0gw7ZwkKN0/?ref=app
23rd Jun 2018, 10:49 PM
non
0
Ace i Did it .... i used very simple commands but why ... when i use a huge number tell me no output https://code.sololearn.com/cZ2O5C6K0AzW/?ref=app
23rd Jun 2018, 10:55 PM
Mohammad Alshareef
Mohammad Alshareef - avatar
0
nonzyro welldone ... but you used alot of unknow command to me 🤔
23rd Jun 2018, 10:55 PM
Mohammad Alshareef
Mohammad Alshareef - avatar
0
Study the STL to get your footing :)
23rd Jun 2018, 11:00 PM
non