1while( 1 ) { }
2for( ;; ) { }//The way it works is very interesting I recommend looking it up.
3
4// To stop the loop you can use the break keyword
5// Like this
6for( ;; )
7{
8 break;
9}
1//to start infinite loop set a variable that doesnt change
2int flag=1;
3while(flag==1)
4{
5 //enter code here
6 //type condition for when you want to end loop
7 //type code
8 //change value of flag
9 flag=2;
10}