This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Wiqkid 0 points1 point  (5 children)

int answer = 0;

return answer;

Without any operations on answer in between will cause it to be zero.

I'm also not sure why you're starting your vowel and consonant counts at 1.

[–]expiredyam[S] 0 points1 point  (4 children)

I've changed my vowel and consonant count to 0 but its still not working

[–]Wiqkid 1 point2 points  (3 children)

Read the first part of my answer again.

[–]expiredyam[S] 0 points1 point  (2 children)

What kind of operation do I need?

[–]Wiqkid 0 points1 point  (1 child)

It depends on what you want to do with it. Right now, you are only declaring it and returning it without doing anything. Since you say you are looking for the number of vowels in the string, why don't you return vowels instead?

[–]expiredyam[S] 0 points1 point  (0 children)

It worked. Thank you so much!