DEV Community

Mahamadjon000
Mahamadjon000

Posted on

1

Infinte loop

Infinte loop - это цикл который выполняется без остановки потому что его условие никогда не становится false.

Пример кода:

#include <iosream>

using namespace std;

int main()
{
int a = 0;

while(a < 5)
{
cout << "Number" << a << endl;
}

return 0;
}
Enter fullscreen mode Exit fullscreen mode

В этом цикле никогда не завершится потому что переменная a не увеличивается и условие a < 5 всегда будет true.

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more