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

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

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

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay