19th May 2020, 12:11 PM
Chayan Mandal
Chayan Mandal - avatar
3 Respostas
+ 5
A little late but I did want to show you a simpler method to solve the challenge using a while and a switch statement. https://code.sololearn.com/cX4kvLvPQJAX/?ref=app
22nd Aug 2020, 8:38 AM
Chris
Chris - avatar
+ 1
This might help you. Although the code executes for almost all the possible inputs, it is not a right way of writing. It crashes when value of 'i' in while loop is increased. https://code.sololearn.com/cgTHJW5IcSC0/?ref=app
20th May 2020, 4:09 PM
Prashanth K V
Prashanth K V - avatar
0
Hint: You can simply iterate through the input string, separate it into tokens and use if statements to print the new strings directly. No need to complicate the code unnecessarily
19th May 2020, 12:14 PM
Abhishek Tandon
Abhishek Tandon - avatar