The code isn't given any output


The code isn’t giving me any output.

hello @bhavay77900
check now->

I am not very clear about the changes you have made :frowning:

did u check the comments?

yes I did But it is actually not very clear
is a call possible?

I understood the error in my code but didn’t understand how cin.get() works.

1000
at the end of this thousand there is one \n character right?
so when we do ch=cin.get() , then we read that \n and put it in ch.

now if u will use while(ch!=\n) condition then this loop will not run becuase ch is already having \n.

thats why i added another line to read next character which is B.

working of cin.get() is very simple . it reads one character at a time

ohhhhhhhhhhh
coool ennough
thanks