急求 1、设计一个判断两个整数大小的VBA子过程. 2、设计一个计算从n~m之间所有自然数之和的VBA函数.
来源:学生作业帮助网 编辑:六六作业网 时间:2025/02/04 03:10:57
急求 1、设计一个判断两个整数大小的VBA子过程. 2、设计一个计算从n~m之间所有自然数之和的VBA函数.
急求 1、设计一个判断两个整数大小的VBA子过程. 2、设计一个计算从n~m之间所有自然数之和的VBA函数.
急求 1、设计一个判断两个整数大小的VBA子过程. 2、设计一个计算从n~m之间所有自然数之和的VBA函数.
sub 大小(byval A% ,byval B%)
if A>B then msgbox A & ">" & B
if A=B then msgbox A & "=" & B
if AN then i=M :M=N:N=i
for i= M to N
n_m之间自然数和=n_m之间自然数和+i
next
end function
sub 大小(byval A% ,byval B%)
if A>B then msgbox A & ">" & B
if A=B then msgbox A & "=" & B
if Aend sub
function n_m之间自然数和(byval M& ,byval N&) as long<...
全部展开
sub 大小(byval A% ,byval B%)
if A>B then msgbox A & ">" & B
if A=B then msgbox A & "=" & B
if Aend sub
function n_m之间自然数和(byval M& ,byval N&) as long
dim i&
if M>N then i=M : M=N: N=i
for i= M to N
n_m之间自然数和=n_m之间自然数和+i
next
end function
收起