1. Home
  2. /
  3. Blog
  4. /
  5. while loop in c++
C++

while loop in c++

October 1, 2022 1 min read 2,446
while loop in c++

// loop going to end in 5 laps
int x=1;
while ( x<=5 )
{
cout<<" hello"<<endl;
x++;
}

// infinti loop

int x=1;
while ( x<=5 )
{
cout<<" hello"<<endl;
}

// infinti loop
while ( true )
{
cout<<" hello"<<endl;
}
Share:
Read next

Related articles