判断整除并求和
来源:互联网 发布:apache下载64位安装版 编辑:程序博客网 时间:2024/06/06 07:26
Public Sub sum(x As Integer, y As Integer,z As Integer, w As Long)
Dim i As Integer
If x > y Then
t = x: x = y: y = t
End If
For i = x To y
If i Mod z = 0 Then
w = w + i
End If
Next i
End Sub
Private Sub text1_KeyPress(KeyAscii AsInteger)
If Not IsNumeric(Chr(KeyAscii)) AndKeyAscii <> 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Command1_Click()
Dim m As Integer, n As Integer, d AsInteger
Dim s As Long '保存结果
m = Val(Text1.Text)
n = Val(Text2.Text)
d = Val(Text3.Text)
s = 0
sum m, n, d, s
Label4.Caption = m & "到" & n & "之间能被" & d & "整除的数之和是" & s
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Text2_KeyPress(KeyAscii AsInteger)
If Not IsNumeric(Chr(KeyAscii)) AndKeyAscii <> 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii AsInteger)
If Not IsNumeric(Chr(KeyAscii)) AndKeyAscii <> 8 Then
KeyAscii = 0
End If
End Sub
- 判断整除并求和
- 判断整除并求和
- 判断整除并求和
- 判断整除并求和
- 判断整除并求和
- 判断整除并求和
- 判断整除并求和
- 判断整除并求和
- 判断整除并求和
- 判断整除并求和
- 判断整除并求和
- 判断整除并求和
- 判断整除或求和
- VB判断整除并整除
- 判断整除
- 判断整除
- 1-100之间不能被7整除的数,并求和,JAVA
- 判断素数并求和用平方根算法(C语言)
- final finally finalize的区别
- jacorb总结
- Sysfs文件系统与Linux设备模型
- 游戏 音乐 美术资源 收集贴
- 关于 CGI FASTCGI PHP-FPM这些东西
- 判断整除并求和
- Asp.net设置默认按钮的方法总结
- JS触发a节点的点击事件
- spring+hibernate+struts2 整合开发中的一个分面查询案例
- 求100以内的素数的和
- Struts中action的方法不能纳入spring事务管理
- 各种音视频编解码学习详解 h264 ,mpeg4 ,aac 等所有音视频格式
- html矢量图 SVG VML 介绍
- wince同步