+ 2
Output showing timeout C++ [SOLVED]
Here is my C++ code which is displaying a timeout error. I don't know why but it is doing this. I don't know what does it mean by saying timeout. Pleaee help me in debugging my code. https://code.sololearn.com/crZT1Zc3Lt3x/?ref=app
2 Respostas
+ 3
It's because in lines 18 and 22, you are trying to divide diff by a variable that is declared as 0.
player1lead = player1lead * (bool)(player1lead/diff) + diff * (bool)(diff/player1lead);
This part
It's the same with line 22.
+ 2
CeePlusPlus Thanks a lot, I got mistake, now the code is working correctly.☺️