Presentation is loading. Please wait.

Presentation is loading. Please wait.

Repetition Yonglei Tao. Display Numbers num = 1 lblDisplay.Text = num & ControlChars.NewLine num = 2 * 2 lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine.

Similar presentations


Presentation on theme: "Repetition Yonglei Tao. Display Numbers num = 1 lblDisplay.Text = num & ControlChars.NewLine num = 2 * 2 lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine."— Presentation transcript:

1 Repetition Yonglei Tao

2 Display Numbers num = 1 lblDisplay.Text = num & ControlChars.NewLine num = 2 * 2 lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine num = 3 * 3 lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine num = 4 * 4 lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine num = 5 * 5 lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine 1 4 9 16 25 lblDisplay

3 Display Numbers (Cont.) num = 1 * 1 lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine num = 2 * 2 lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine num = 3 * 3 lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine num = 4 * 4 lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine num = 5 * 5 lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine

4 Display Numbers (Cont.) num = x * x lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine num = x * x lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine num = x * x lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine num = x * x lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine num = x * x lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine x = x + 1 x = 1

5 The For Loop For x As Integer = 1 To 5 num = x * x lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine Next x x num1 2424 3939 416 525


Download ppt "Repetition Yonglei Tao. Display Numbers num = 1 lblDisplay.Text = num & ControlChars.NewLine num = 2 * 2 lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine."

Similar presentations


Ads by Google