0
My else if statement seems to be right but it wont run.. Anyone can help?
Else if statement to input the first letter of the color whether uppercase or lowercase and then output the color https://code.sololearn.com/ca8ZI6g5Ozrn/?ref=app https://code.sololearn.com/ca8ZI6g5Ozrn/?ref=app
6 Réponses
+ 3
You need to enter char values in ' ' or " " marks.
char r = 'r'
color == 'R'
+ 3
char literals are wrapped in single quotes. C-string are wrapped in double quotes.
getc() doesn't seem to work in Code Playground, no input dialog popping up asking for values.
+ 1
Yeah i use other compilers and it works on them..
+ 1
Hiiii
+ 1
Im c++ Firends
0
Thanks man.. I cant believe i forgot and made a easy mistake