0

I want to print the letters beside each other..help me please ...

Guys, this code gets Capital letters and prints the letters above each other in stars.. Like : input : JOEY output: J O E Y But I want them to be printed beside each other like when you enter : JOEY TRIBBIANI The output will be : JOEY TRIBBIANI you can run the code to know what I mean.. https://code.sololearn.com/c2hrbmdOzf0k/?ref=app

13th Dec 2019, 10:40 AM
M.Gavili
M.Gavili - avatar
4 ответов
+ 1
The user inputs string, but you store it into char. That's the main problem since char can only hold 1 character. Store the input into string. Iterate the string and it will work. And just telling, you can improve your code a lot.
13th Dec 2019, 12:04 PM
你知道規則,我也是
你知道規則,我也是 - avatar
+ 2
It is most probably better to leave the letters underneath each other since on phones it will display better. As CarrieForle said, there are so many other things that you can do better. Take alook at this code and see what you can learn. https://code.sololearn.com/cozgL69YFEWm/?ref=app Edit : I'm not saying this is the ultimate, just that there are some fundamentals that you could apply.
13th Dec 2019, 3:41 PM
Louis
Louis - avatar
0
Thank you so much.. I saw your code and it was so shorter and better... And I can use stars instead of the sharps and delete the points and replace it with spaces...
13th Dec 2019, 4:56 PM
M.Gavili
M.Gavili - avatar
0
M.Gavili Just take note, its not my code. Check the name.
13th Dec 2019, 5:55 PM
Louis
Louis - avatar