answersLogoWhite

0

do statement; while (condition);

or

do { statements } while (condition);

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How do you make your video rewind in window movie maker?

There is no 'loop' feature in the program.


How can you create a loop using a knot?

To create a loop using a knot, you can make a simple overhand knot in a rope or string and leave a small loop at the end. This loop can be used for various purposes such as attaching a hook or securing an object.


Write a program to display 1 to n numbers using loop in oracle?

You can use a PL/SQL block to display numbers from 1 to n in Oracle. Here's an example program: DECLARE n NUMBER := 10; -- Change this value to your desired n BEGIN FOR i IN 1..n LOOP DBMS_OUTPUT.PUT_LINE(i); END LOOP; END; / This code declares a variable n, then uses a FOR loop to iterate from 1 to n, printing each number using DBMS_OUTPUT.PUT_LINE. Make sure to enable output in your SQL environment to see the results.


How can a switch loop be used to efficiently iterate through different cases in a program?

A switch loop can efficiently iterate through different cases in a program by evaluating a variable or expression and then executing the corresponding case without having to check each case individually. This can make the code more organized and easier to read compared to using multiple if-else statements.


How does loop work?

In programming, a loop works by conditionally jumping to the start of the loop and repeating the instructions. If the condition evaluates false, execution continues to the next instruction, thus breaking out of the loop. We can also break out of a loop from within the body of the loop itself using another conditional jump which jumps out of the loop. If we jump backwards out of a loop we effectively create an intertwined loop, known as spaghetti code which is difficult to read and maintain. Structured loops help make it easier to digest the logic. In C, a jump is achieved using a goto and a label. However, structured loops using for, while and do-while statements make loops much easier to read and maintain.


How do you fix an infinite loop?

It comes from its name: it doesn't terminate, the user have to interrupt the program-run (in the worst case: power off the computer).The infinite loop is also used to program loops with non-easily-deterministically end-of-loop conditions.You write an infinite loop, such as for (;;) {statements}, and break out of the loop with the break statement when ready to terminate.


How do you make C plus plus program to draw a straight line using for loop method?

void line(int length) { for(int i=0; i<length; ++i) std::cout<<'_'; std::cout<<std::endl; }


How do you make a c plus plus program using while loop to print a sum of digits?

Place the digits in an array (or vector) and use the loop to sum each digit to a running total initialised to zero. The following function demonstrates the loop: int sum_vector(std::vector<int>& v) { int total=0; int i=0; while( i<v.size() ) total+=v[i]; return total; }


How do you make a fakemon sprite?

using the program paint


How can I loop an MP4 video file?

To loop an MP4 video file, you can typically use video editing software to set the video to play continuously in a loop. This feature is often found in the settings or options of the video editing software you are using. Simply select the loop or repeat option to make the video play in a continuous loop.


How you can make a program using XL data?

you dont lol


How to write a program to show the counter that counts 1000000 in a second?

You need to know how long a loop of 1000000 takes to execute. If it executes in an appropriate fraction of a second, you can provide a sub-loop or no-op instructions to make up the difference. If it does not, you can not.