VB 编程:输入若干个正整数,记录并输出偶数的个数,知道输入-1为止 程序有谁会,帮个忙。

[复制链接]
查看11 | 回复2 | 2012-8-24 14:52:07 | 显示全部楼层 |阅读模式
'这个我试过了,可以用Option ExplicitPrivate Sub Command1_Click()
Dim a(100) As Integer
Dim i As Integer
Dim icount As Integer
'统计输入次数
Dim c(100) As Integer
Dim jCOUNT As Integer
'统计偶数个数
Dim aa As String
Dim b As Integer
Do
a(icount) = Val(InputBox("这是第" + CStr(icount + 1) + ...
回复

使用道具 举报

千问 | 2012-8-24 14:52:07 | 显示全部楼层
Private Sub Command1_Click()Dim r As IntegerDim c As IntegerWhile Truer = Val(InputBox("Input a Number"))If r = -1 ThenMsgBox "偶数个数:" & c, vbInformation, "偶数个数"Exit S...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行