Repetition Yonglei Tao
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 lblDisplay
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
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
The For Loop For x As Integer = 1 To 5 num = x * x lblDisplay.Text = lblDisplay.Text & num & ControlChars.NewLine Next x x num