Q. What is the use of looping statements??
Q. Write names of different looping statements??
Q. What is the use of FOR NEXT loop??
Answers
Answer:
- In looping, a program executes the sequence of statements many times until the stated condition becomes false. A loop consists of two parts, a body of a loop and a control statement.
- There are main three loop statements:
- For loop: most precise loop in whole statements.
- While loop is another loop.
- last one is do-while loop in which statement must executed at once whether condition is true or not.
- other statements like foreach loop that is use in java, c# etc.
3..)next statement is an iterative, incremental loop statement used to repeat a sequence of statements for a specific number of occurrences. A for... next loop executes a set of statements for successive values of a variable until a limiting value is encountered.
Answer:
In looping, a program executes the sequence of statements many times until the stated condition becomes false. A loop consists of two parts, a body of a loop and a control statement
THERE ARE TWO TYPES OF LOOP.
1)-ENTRY CONTROLLED LOOP.
Which checks the condition and then executes and will not execute if the condition is false.
2)-EXIT CONTROLLED LOOP
Which executes first and then checks the condition. Even if the condition will be wrong
they will execute once.
The for … next loop is a very simple way of carrying out a set of instructions for a definite number of times. ... but I only know that visual basic has it as for … next, we do not use braces.