answersLogoWhite

0

If you are speaking of while loops, this might be the answer for you.

Example 1:

for (i = 0; i < 100; i++)

{

}

Example 2:

do

{

i++;

} while (i < 100);

or even

Example 3:

while (i < 100)

{

i++;

}

This finalization of loops can be done with many conditions. These examples contain only counter. There are many other ways to make an infinite loop finite.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What does an electric eel use its electricity for?

It is used as both a defensive mechanism to avoid predators, and an offensive mechanism when they are hunting.


Is substance use a negative coping mechanism to avoid fear?

Yes it is.


What is the purpose of flaming the loop before and after use?

Inoculating loop is used to inoculate microbial colony or sample on culture medium and to avoid the undesired microbial cells or to avoid contamination flaming of inoculating loop is necessary it is also called as incerination.


What is loop checking in dcs explain with diagram?

its nothing but just to loop and check the answer with the corresponding alpha co-ordinate. It can also be simply under stood as the way of checking the mechanism with the use of loop. And the point to be noted is that all loop check are reversible up to a limit. Just press F4.


What are some strategies to avoid getting stuck in an infinite loop in Magic: The Gathering?

To avoid getting stuck in an infinite loop in Magic: The Gathering, players can use cards that have a clear win condition or a finite number of repetitions. Additionally, players can carefully track the number of times a loop has occurred and make sure to follow the game rules to prevent an infinite loop from happening.


For loop -uses?

You can use a for loop whenever you can use a while loop; it's the same.


What is the main use for the pid controller?

The main use for the pid controller is to be a generic control loop feed back mechanism (the controller) and the pid controller is widely used in all areas of the world.


Why you use if loop in telecoms?

No such thing as if-loop. if-else statement is not a loop.


Substance use is a negative coping mechanism to avoid what?

Substance use is often used as a coping mechanism to avoid dealing with difficult emotions or situations, such as stress, anxiety, depression, or past trauma. It can provide temporary relief or escape from these uncomfortable feelings, but in the long run, it can lead to dependence, addiction, and more negative consequences.


What is mechanism of cientation?

Cientation is an imaginary term and does not have any defined meaning or mechanism. It may have been a typographical error or a misunderstood term. It is important to use correct terminology to avoid confusion in scientific discussions.


How can I use the ffmpeg loop feature to create a continuous video loop?

To create a continuous video loop using the ffmpeg loop feature, you can use the &quot;loop&quot; option in the ffmpeg command followed by the number of times you want the video to loop. For example, you can use the command &quot;ffmpeg -streamloop -1 -i input.mp4 output.mp4&quot; to loop the video indefinitely.


Is it possible to use a for loop in place of a while loop?

Yes. while loop consist of only condition statement to make for loop look as while loop we can use syntax shown below: for(;condition;) eg: for(;i&lt;=n;)