A

Admin • 828.03K Points
Coach

Q. Which loop is better for validating user input until it is correct?

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

Explanation by: Admin
do-while ensures input is taken at least once before checking validity.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.