+ 2
Why my code is not giving output?
1 ответ
+ 1
just remove the system("clear") and sleep() function and it works
https://code.sololearn.com/c7zMDZKewbtP/?ref=app
Why it does not works ?
Ans :- Because sololearn is not continuously logging the console output but simply pasting the console output until the code ends or it sleeps.
I hope you understand that your is not wrong because it runs perfect on a pc.