No Output in C | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

No Output in C

I created a count down timer in c that works perfectly but it prints "No Output" in Sololearn IDE https://code.sololearn.com/cN1DMGc0RPTw/?ref=app

10th Oct 2023, 11:08 AM
Ashish Kumar
Ashish Kumar - avatar
3 Answers
+ 2
I understand that the sleep function() will not work in Sololearn, since its interpreter works through the server and has a time limit. You can correct (1) to (.1) and make a note about it in the comment, then your code will print a countdown, but without a time delay.
10th Oct 2023, 11:51 AM
Solo
Solo - avatar
+ 3
If you want the zero as the last output, you should use this in your code instead: while (count >= 0)
10th Oct 2023, 12:15 PM
Jan
Jan - avatar
+ 1
It's your sleep method. You should decrease the time like: sleep(0.9) or sleep(0.1) works... It's probably the time limit exceed in the playground system that prevents the output.
10th Oct 2023, 11:43 AM
Jan
Jan - avatar