恶作剧之吻3甜蜜再续:有谁懂VB等进来,帮我编个程序~~~~~~~~

来源:百度文库 编辑:高考问答 时间:2024/04/28 19:20:53
编写程序,用循环生成下面的图形。
1 2 3 4 5 6 7
1 2 3 4 5
1 2 3
1

dim i,j as integer
dim str1 as string
for i=4 to 1 step=-1
for j=1 to 2*i-1
str1=str1+str(j)
next
str1=str1+chr(13)
next
label1.text=str1

Dim x, y As Integer
For x = 4 To 1 Step -1
For y = 1 To 2 * x - 1
Print y;
Next y
Print
Next x

顺便说一句,一楼的for循环用错了,step后没=