0% found this document useful (0 votes)
19 views1 page

loop examplesدوائر كهرباء

دوائر كهرباء

Uploaded by

mabdraman455
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

loop examplesدوائر كهرباء

دوائر كهرباء

Uploaded by

mabdraman455
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Public Class Form1

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles


Button1.Click
Dim sum As Integer
For i = 1 To 10
sum = sum + i
Next
Label2.Text = sum
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles


Button2.Click
Dim i, sum As Integer
i = 1
Do While i <= 10
sum = sum + 1
i = i + 1
Loop
Label3.Text = sum
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles


Button3.Click
Dim i, sum As Integer
Do
sum = sum + 1
i = i + 1
Loop Until (i > 10)
Label4.Text = sum
End Sub

Private Sub Button4_Click(sender As Object, e As EventArgs) Handles


Button4.Click
Dim i, sum As Integer
Do Until i = 10
sum = sum + 1
i = i + 1
Loop
Label5.Text = sum
End Sub

Private Sub Button6_Click(sender As Object, e As EventArgs) Handles


Button6.Click
End
End Sub

Private Sub Button5_Click(sender As Object, e As EventArgs) Handles


Button5.Click
ListBox1.Items.Clear()
Dim i, Z As Integer
Z = InputBox("please enter a nummber")
Do Until i = 10
i = i + 1
ListBox1.Items.Add(Z & " X" & i & " = " & Z * i)
Loop
End Sub
End Class

You might also like