Magic
is written incorrectly... You have to create new string inside a loop to display it finally.
1) in the first step ->
newstring += "* " + char[i] + " * "
2) in every middle step ->
newstring += char[i] + " * "
3) in the last step ->
newstring += char[i] + " *"
I'd suggest to use
StringBuilder[
^], because
string is immutable[
^].
I do not see second method...
It's quite simple. You need to iterate through the chars of string and add 1 to the ascii value of each char.
char s = 'S';
char t = (char)((int)s + 1);
Do not forget to use
StringBuilder
!
Good luck!