编写VB程序,打印1到100所有数的平方,平方根,自然对数,e指数的数用表
1个回答
展开全部
Private Sub Command1_Click()
Dim p As Long, g As Single, l As Single, e As Double
Print "数值", "平方 ", "平方根 ", "自然对数 ", " e指数"
For i = 1 To 100
p = i ^ 2
g = Sqr(i)
l = Log(i)
e = Exp(i)
Print i, p, g, l, e
Next
End Sub
Dim p As Long, g As Single, l As Single, e As Double
Print "数值", "平方 ", "平方根 ", "自然对数 ", " e指数"
For i = 1 To 100
p = i ^ 2
g = Sqr(i)
l = Log(i)
e = Exp(i)
Print i, p, g, l, e
Next
End Sub
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询