Computer Science, asked by radar156, 1 year ago

state one similarity between while loop and do-while loop

Answers

Answered by AnjaliSapkota191
40

The similarites are that each has a body of code that is executed perhaps multiple times. This is usually called the “loop body”. They also have a “while” portion that tests a condition that determines whether the loop should be executed another time.

Answered by dreamrob
4

The similarities between while loop and do-while loop are:

  • They both have a while statement to determine whether the statement is true or false.
  • Both of these loops have a block of programs that get executed multiple times while the statement is true.
  • The condition checking and iterative loop is the same in the while loop and do-while loop.
Similar questions