+ 11

I would like to use 'delay function' on C but why does 'time limit exceeded' come up when trying to run?

Is there any way to see how the process of running works with delay function? like this? #include <stdio.h> void delay(void) { int i = 500000000; while (i--); } int main() { int a, b, i; printf("input decimal number : "); scanf("%d", &a); for(i=0;i<8;i++) { if(a&0x80>>i) printf("1"); else printf("0"); delay (); } return 0; }

29th Sep 2018, 5:54 AM
Henry Shin
Henry Shin - avatar
6 odpowiedzi
+ 5
SL put time, memory and some other limits then if you have need to run your code without these limits, try to run your program on your local machine
29th Sep 2018, 6:18 AM
KrOW
KrOW - avatar
+ 2
well for delay time of program execution for no. for seconds i c -> sleep(time); in books. it will work on turboC but don't know abt solo compiler.
29th Sep 2018, 6:25 PM
Rishab Sharma
Rishab Sharma - avatar
+ 2
Any problems
29th Dec 2018, 11:35 AM
Bajgul Quamar
Bajgul Quamar - avatar
+ 1
well try these program in other compilers too
2nd Oct 2018, 6:31 AM
Rishab Sharma
Rishab Sharma - avatar
+ 1
Why 🚫
29th Dec 2018, 11:42 AM
Bajgul Quamar
Bajgul Quamar - avatar