Hello and Hi everyone!!!!
How's your weekend???
Its fun???
Ekeke...
This Week I Would Like To Share About The Differences Between Do-While and Do-Until
Are u ready???
Lets start it...!!!!OPPSS...!!! Before it, I think U should know about the loop...
LOOP STRUCTURE
~ is the one of three logic structures
~ its describes about the process that may be
repeated as long as a certain condition remains true.
~ also call as iteration
~ has 2 variations : DO WHILE and DO UNTIL
DO WHILE loop completes steps as long as a certain condition is true.
Meanwhile, DO UNTIL loop does something until a condition is no longer true.
The DO WHILE
- The do loop executes a block of codes as long as a condition is satisfied.
- If the condition is false as the while loop is entered the block of code is never executed.
- Since the condition is tested at the bottom of a do loop, it is block of code is always executed at least one
- By the way, some people don't like these loops because it is always executed at least once.
- It will execute no matter what value or type of data is supposed to be required
- As long as the specified condition remains true, the list action continue to perform it just loops around and around.
- Evaluates the condition at the top of the loop.
- Example :DO read in job information WHILE (that is, as long as) there are more jobs
The DO UNTIL
- Opposite effect
- The script continue to perform the task until a certain condition is met
- Evaluates the condition at the bottom of the loop
- The statements in a Do-Until loop always execute at least one time
- Example : DO read in job information UNTIL there are no more jobs
So, please be careful and don't be confused again between do-while and do-until...
See you again later..
Bye...!!!! ^oo^
0 Response to " "
Post a Comment