Computer Science, asked by chaturvedipreeti723, 3 months ago

explain the types of iterative statement with an example ​

Answers

Answered by swethajanarthanam
3

Answer:

Iteration is when the same procedure is repeated multiple times. Some examples were long division, the Fibonacci numbers, prime numbers, and the calculator game.

Answered by saanvi2208
2

Answer:

Java's Iteration statements are for, while and do-while. These statements are commonly called as loops. A loop repeatedly executes the same set of instructions until a termination condition is met.

Explanation:

 

For example, if we want to print Hello for 10 times, we need to call the print statement 10 times. This could be achieved by explicitly calling print statement 10 times as shown below.

System.out.println("Hello");

System.out.println("Hello");

System.out.println("Hello");

System.out.println("Hello");

System.out.println("Hello");

System.out.println("Hello");

System.out.println("Hello");

System.out.println("Hello");

System.out.println("Hello");

System.out.println("Hello");

Similar questions