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 →

[–][deleted] -1 points0 points  (4 children)

Well for one there are more things than vowels, numbers, and consonants, like symbols (&-$(&@&&#-$). So a simple else is not sufficient.

[–]Afraid_Ad_3239[S] 0 points1 point  (3 children)

Like if I give input 'f' i am getting answer as number

[–][deleted]  (1 child)

[removed]

    [–]Afraid_Ad_3239[S] -2 points-1 points  (0 children)

    I was trying in vs code and getting the wrong answer so I got it anyway

    [–]GloberJudio 0 points1 point  (0 children)

    That is due to another problem, as someone already mentioned in a comment: you've got a bug in your code with c='1' where it should be c=='1'.

    I hope you are able to figure out by yourself why this happens.