answersLogoWhite

0

The for loop should be used when there is a progression over the members of an array, or where there is a clear initialization, termination-check, and increment. If the block simply has to execute until some condition occurs, use a while loop. The do loop should only be used when the loop must execute at least once, and even then sparingly. It is harder to understand, since the test occurs at the end (it is more like a simple goto).

User Avatar

Wiki User

17y ago

What else can I help you with?

Continue Learning about Engineering

Why do you use the loops in java?

You use loops in Java when you want a set of actions to be repeated until a particular condition is met or for a certain number of times.The different types of loops in Java are:For LoopsDo-While LoopsWhile Loops


Three kinds of iteration structures in c?

Iteration structures are also called as loops. The following are the loops available in c. 1. for (initialization; condition; increase/decrese) statement 2. while (expression) statement 3. do statement while (condition)


What is a loop type?

A Loop is a programming language construct that instructs the processor to repeat a sequence of operations a number of times until a specific condition is reached. There are different types of loops. They are: * for loop * while loop * do while loop


Working diag of simple digital security system?

he circuit works off a 9V regulated power supply. However, battery back-up is recommended. A common-cathode, 7-segment display (LTS543) is used for displaying whether the loops are intact or not. If loop 1 is broken, the display will show '1'. If two or all the three loops are broken, the display will show the sum of the respective broken loop nently. The loops are also connected to a dual 3-input NOR gate and inverter CD4000 (IC2) to activate the alarm. Fig. 1 shows the circuit of the digital security system, while Fig. 2 shows the proposed wiring diagram for the loops around the premises. Before using this security system, make sure that loops shown in Fig. 2 are connected as shown in Fig. 1. If you don't want to use a buzzer, switch it off by opening switch S2. The circuit works off a 9V regulated power supply. However, battery back-up is recommended. A common-cathode, 7-segment display (LTS543) is used for displaying whether the loops are intact or not. If loop 1 is broken, the display will show '1'. If two or all the three loops are broken, the display will show the sum of the respective broken loop numbers. For example, if loops 1 and 4 are broken, the display will show 5(1+4). When all the three loops are intact, the display will show '0.' All the three inputs of gate N1 remain low to give a high output. This high output is further given to gate N2 and, as a result, its output remains low. This keeps transistor T1 in cut-off position and the piezobuzzer does not sound. When any loop is broken, the output of NOR gate N1 goes low, while the output of gate N2 goes high. Transistor T1 conducts and the buzzer sounds to alert you. You can mute the buzzer by switching off power to the circuit through switch S1.


How do you compute instantaneous value at given time of three phase alternator?

your mom nothing

Related Questions

Tell you how many loops?

Around three.


Types of fingerprints?

There is three types of fingerprints. Loops,Whorls,And Arches. Loops-30% Whorls-65% Arches-5%


What are three main types of fingerprints?

There are loops, arches, and swirls


What are the three main types of fringerprints?

arches, loops and whorls


What are three types of fingerprint patterns?

Loops, whorls and arches.


Three original flavors in froot loops?

Orange, Lemon, and Cherry


Can you use Song stream loops to sell your Instrumental to someone?

i am using three loops of song stream pack , ia m selling my beat exclusively . is it legit ?


How do you hdc?

Hdc is the abreviation for half double crochet. When you double crochet you wrap wool around the hook before you push the hook through the stitch to pull up a loop. After you pull up the loop you have three loops on your hook. Usually you will then pull a loop through two of the loops and pull a second loop through the remaining two loops. With the half double crochet you will pull one loop through all three loops.


How many loops of a lungs does a horse have?

No horse, nor any mammal, has any "loops" of lungs. They do, however, have lobes of lungs. The horse has five lobes: two on the left and three on the right.


What are three finger prints patterns analysts look for in making a match?

Arches, loops and whorls.


How many loops and stems does trna has?

tRNA (transfer RNA) is composed of one loop and three stems. The loops and stems play important roles in tRNA's ability to bind to specific amino acids and the ribosome during protein synthesis.


What three actions do count loops typically perform using the counter variable?

Test initialize increment