Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 7

FEDT Presentation

GGS INDRAPRASTH UNIVERSITY

Submitted to Submitted
Ms. Deepti Gupta Manish
Assistant Professor (IT) 048
BCA E1 2016-2019
Topic

DO WHILE LOOP

AVL Trees - Lecture 8 12/26/03


 Visual Basic loop structures allow to run one or more lines
of code repetitively

 Statements in a loop structure can be repeated

Until a condition is True


Until a condition is False
A specified number of times, or
Once for each element in a collection
Types of Looping:

There are mainly 3 types of loop:


For Loop
While Loop
Do Loop

AVL Trees - Lecture 8 12/26/03


 One of the Do Loop statements variations is the Do
While and it executes as long as a condition is true
(while a particular condition is true).
 Loop will get stops when condition is False.
 Exit DO can be use to exit from loop anytime.
Syntax:-
Do {While} condition
statements
[Exit Do]
statements
Loop
Example of Do While
Print Table
Module Module1

Sub Main()

Dim a, i As Integer

a=1

console.writeline("Enter the number")

i =Console.ReadLine()

Do While a < 10

a=a+1

Console.WriteLine(a * i)

Loop

Console.ReadKey()

End Sub

End Module
THANK YOU

You might also like