https://ide.codingblocks.com/s/653714 : I want to ask that why I am getting error while using compare function in this program.
Regarding the usage of compare function
compare() is used with strings not with char
str[i] is not string itβs a character
so str[i].compare is incorrect
in question you have to take only single character not the string
simply use this condition
if(ch>=βAβ && ch<=βZβ)
cout<<βUβ<<endl;
@sb1251224_6919c19fccd96630 as i can see you have submitted the code and got 100 points hence give your feedback
I hope Iβve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.