A

Admin • 828.43K Points
Coach

Q. Which type of loop is best when the end condition depends on user input?

  • (A) for
  • (B) while
  • (C) do-while
  • (D) foreach

Explanation by: Admin
do-while ensures the loop runs at least once, useful for input-dependent ends.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.