0
Why am I getting this output?
https://code.sololearn.com/cfnzCejflVzR/?ref=app https://code.sololearn.com/cu7W7CnJaSEy/?ref=app
3 Answers
+ 1
to be shure: an input of "1 abc" should output "bcd". Right ?
0
Code 1
line 18: i=0
19: j++
20: str[j]
20: alph[i]
21: alph[i+num]
And you should handle the case that i+num can be > alph.lenght.
Also right now the performance is really bad. You should rethink your algorithm.
0
You have a point, but now?
https://code.sololearn.com/cu7W7CnJaSEy/?ref=app
Why the following code doesn't work?
if(i+num>26){
code[j] = alph[(i+num)-26];
}