怎样在vb中用*打出平行四边形?
问题描述:
怎样在vb中用*打出平行四边形?
答
Dim s As String
Dim n As Integer, m As Integer
m = Val(InputBox("平行四边型的长度(即*的个数)")) ‘如果是常数值自己更改为常数即可
n = Val(InputBox("平等四边型的高度(即*的行数)"))
s = String(n, "*")
Me.AutoRedraw = True
For i = 0 To m
Print String(m - i, " "); s
Next