Syntax for infinte loop! | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Syntax for infinte loop!

6th Dec 2016, 9:49 AM
Abhishek
Abhishek - avatar
6 ответов
+ 5
for(x=1; x>0;x++){} for example
6th Dec 2016, 10:00 AM
Filip
Filip - avatar
+ 4
Everything that is done infinite times is an infinite loop, you can make many of them
6th Dec 2016, 10:06 AM
Filip
Filip - avatar
+ 1
more easy one for(;1>0;)
6th Dec 2016, 10:26 AM
Megatron
Megatron - avatar
0
while(1) {}
6th Dec 2016, 11:43 AM
Дмитрий Шкурко
0
while (true) { } is the standard for an infinite loop. Or replace "true" with a non-zero integer, as already mentioned, which is just another way of saying "true".
6th Dec 2016, 3:47 PM
Cohen Creber
Cohen Creber - avatar
0
for (; ; ;) while (1) do . . . while(TRUE)
2nd Jan 2017, 3:21 PM
Zahid Khan
Zahid Khan - avatar