Is there any problem that cannot be solved using while loop but can - ProProfs Discuss
Advertisement

Is there any problem that cannot be solved using while loop but can be solved using do while loop?

Is there any problem that cannot be solved using while loop but can be solved using do while loop?

Change Image    Delete

Asked by G. Horace, Last updated: Mar 22, 2024

+ Answer
Request
Question menu
Vote up Vote down

1 Answer

M. Parker

M. Parker

M. Parker
M. Parker, Internet Researcher, Houston

Answered Aug 24, 2018

If in case you are not aware, the Do While Loop is a statement that makes sure that a code is executed. It will repeatedly execute the code until it is stopped. This is obviously something that can be used for a task that has to be done at least once. The answer to this question is no. Their functions are different.

While Loop, you need to be specific about the bool value. This is not something that you have to worry about when using the Do While Loop. Just remember that their purposes are different and you should not interchange the two to avoid confusion.

upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.