Can anyone the reason of Time Limit Exceeded on submiting.
Simple Calculator Time Limit Error
@arc21hit Hey Archit, in switch case you are using break which breaks the switch and doesn’t break the loop so that’s why your program is going into infinity loop as no way to stop loop.
Another one you can’t do like this case ‘x||X’ because you can write only one character in single quotation.
Okay, Thank You.
one more thing, do i have to change the loop or is there any way of breaking it in above format??
@arc21hit Hey Archit, No need change the loop. simply write the condition in while(oper != ‘x’ && oper != ‘X’);
I hope I’ve cleared your doubt. Please mark this doubt as resolved and rate me on the basis of your experience. Rating option is just below where you mark this doubt as resolve. Your feedback is very important. It helps us to 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.