Can you plz help me with this error

runguard: warning: timelimit exceeded (wall time): aborting command
runguard: warning: command terminated with signal 15

Hello @manav_sharma your corrected code:

ok thanks. Can you clear one more doubt that as its given in question β€œ3.If ch is β€˜X’ or β€˜x’, the program terminates.”. then why are we using "and "operator and why not β€œor”

@manav_sharma because both of them are the terminating conditions.
here you have written the conditon i.e while(ch!=β€˜x’ || ch!=β€˜X’) this means if you have ecountered x but in this then the other condition will become true and in or if any condition is true then the result will evaluate as TRUE only.
so this do while loop will never end.

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.