LetterChanges(str) take the str parameter being passed and modify it using the following algorithm. Replace every letter in the string with the letter following it in the alphabet (ie. c becomes d, z becomes a). Then capitalize every vowel in this new string (a, e, i, o, u) and finally return this modified string. code in c++ or c
example:
input: hello
output: Ifmmp
Answers
Answered by
0
Answer:
Your problem isn't that toUpperCase() isn't working, it's that your code never gets to that point.
Your
if (al.charAt(al.indexOf(str.charAt(i))+1) == vo.charAt(vo.indexOf(str.charAt(i))))
never passes, because of that +1. There's no need for that there, and if you remove it, uppercase vowels will appear. There are other problems with your code beyond that point, but I'll let you solve them as part of the challenge :-)
Explanation:
please make me brainliest
p
l
e
a
s
e
Similar questions
Physics,
4 months ago
Biology,
4 months ago
Social Sciences,
4 months ago
Social Sciences,
9 months ago
English,
9 months ago
India Languages,
1 year ago
English,
1 year ago
History,
1 year ago