answersLogoWhite

0

Draw a Do-until loop

Updated: 8/10/2023
User Avatar

Wiki User

9y ago

Best Answer

This is a loop function ... the loop will continue until something true happens. example: int i = 0; do { console.write(i + "< br />"); i++; }while(i < 100); This will loop 100 times.

User Avatar

Wiki User

16y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

9y ago

A Do Until loop is a device used in programming. The loop runs until a certain criteria is met. An example might be a loop that keeps track of a set of scores until the total number of the scores reaches 4000.

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

A "do until" loop is a control structure that executes a block of code repeatedly until a certain Boolean conditional statement (e.g. end_of_file == TRUE) becomes true. Check with the specific language definition, but a "do until" loop just like a "repeat until" loop but unlike a "while" loop is likely to execute the code block at least once regardless of the initial value of the conditional.

An example of a do until loop is: do read word echo I just read $word until (word == EOF) An "each" loop executes a block of code once per list of things. An example is for each thing apples Pears cucumbers do echo I like to eat $thing done Both examples are just pseudocode, not any actual language.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

Do Until tells the program to do something until smthing is true

for example lets say we have variable x which is equal to 5, if we do this

Do until x = 5

msgbox("x = 5")

end loop

the program will keep printing on msgbxs "x = 5" until x is actually not = to 5 (until x changes)

In for each (or for next) loop, the program checks if condition is true, if it is, it does something and loops doing that thing until the condition is false or vice versa

ex:

for each x = 5

do something

next

contnue code as normal

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

A Do-Loop, repeats a section of code until a certain condition has been met.

Count = 0

Do

Count = Count + 1

Msgbox(Count)

Loop Until Count = 5

This will make 5 message boxes appear, with the number 1 through 5 in them, they can cut down on the code you need to use.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

In the C Programming language, the do-while loop is a loop construct whose body will be executed at least once, as the loop terminating condition is validated at the end of the loop's body.

Here is an example:

int main (int argc, char **argv) {

int i= 0;

do {

printf ("%d. '%s'\n", i, argv[i]); } while(++i

return 0;

}

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

In C and C++, a repeat until loop is created using a do-while loop structure. A do-while loop executes at least once and terminates when the while condition evaluates false, re-iterating the loop if the evaluation is true. This is in contrast to for and while loops which evaluate the condition at the start of each iteration, and may not execute at all.

Which loop structure you use is determined by the type of loop. If you need to count the iterations with a control variable and/or perform one or more actions at the end of each loop then a for loop is generally best. If the loop is simply conditional then a while loop is best. And if the loop must execute at least once, then a do-while loop is best.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

Do while loop is a computer programming term that refers to a control flow statement and is often called a while loop or a pro-test loop. It allows a code to be executed once, based on a boolean condition. The code is executed and then the condition is evaluated. The code is always executed first and then evaluated. If the condition is found to be true, it continues to execute until it is found false. When its found to be false then it terminates and moves on to the next statement.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

What's your question about them?

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Draw a Do-until loop
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is a DOWHILE loop more flexible than a dountil loop?

No, they are equivalient. DO something WHILE condition; does the same thing as DO something UNTIL NOT condition;


What is the difference between dowhile loop dountil?

A do-while loop checks its termination condition before each iteration, including the first; a do-until checks after each iteration, so that the first iteration occurs before the first check. The C language uses the word "while" for both types of loop, using the placement of the condition to control its timing:C do-while:while (condition) { /* condition checked before first loop iteration */... loop contents}C do-until:do {... loop contents} while (condition); /* condition not checked until after first loop iteration */


When Draw a flow chart of table 2?

in loop when draw a flow chart of table 2


How do you draw a cursive I?

lower case it's a small loop with a dot, and the capitalized is a straight (small) line in the middle of the paper the a big loop.


What is the cheat so that you only have to draw one loop in pkmn ranger 2?

there is none


How do you write ca cursve j?

you draw a line down, loop up, and dot over the line.


What is the function of the ascending limb of the loop of henle?

The function of the ascending loop of henle is draw Sodium out of the filtrate. The ability of the ascending loop to actively transport sodium into the surrounding tissue is directly related to the amount of water that can be diffused out of the descending loop of henle. (main factor in water re-absorption)


How do you draw cute cartoon puppies?

you draw two circles beside each other and then put three dots in them then you make a triangle above the circles then draw a loop for the tongue and then draw half a circle from one circle to the other then draw some eyes and make some ears.


Write an algorithm or draw a flowchart to display numbers from 100 down to 10?

n=100 loop until n = 9 print n n = n -1 end loop


How do you draw a camera?

Draw a rectangle, then a circle in the middle of it, then a smaller circle in that, a small Button on the top-right of it, you can add like a little, loop on the bottom right ( a holding strap -Optional- ).


In DevCplusplus Allegro Id like to use a for loop so you can draw multiple primitives without having to declare each one could anyone tell you how to do that?

You only have to declare objects if you intend to store them. If you simply want to draw objects without storing them, then use static drawing methods in your loop.


How many years does a water draw calibration need to be preformed on a LACT prover loop?

5 Years in Federal waters GOM.