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)

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay