❔ Homework Help... Again... Chars and Conditional Statements
Hi, for this problem, I am given a char, starter, and an int, number.
I have to find the subsequent characters based on the value of number and return them as a string.
For example:
starter is g
number is 5
return is ghijk
I would prefer just help with where to go from what I have right now, and would appreciate it if I am not outright given the answer.
4 Replies
this is what I have right now, and it is only outputting the last char of the string needed
EX: if expected is ghijk, my code is returning k
Because you keep replacing the
answer
You probably want to append to it
With +=
for examplegod dammit
i thought thats what i was supposed to do
but i put the += between starter and i instead of answer and works now, thank you.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.