Function fun(a As Integer,n As Integer) As IntegerDim m As IntegerWhile a >= na = a - nm = m + 1Wendfun = mEnd Function该函数的返回值是__能给说明白点原因吗?
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/31 03:30:43
Functionfun(aAsInteger,nAsInteger)AsIntegerDimmAsIntegerWhilea>=na=a-nm=m+1Wendfun=mEndFunction该函数的返
Function fun(a As Integer,n As Integer) As IntegerDim m As IntegerWhile a >= na = a - nm = m + 1Wendfun = mEnd Function该函数的返回值是__能给说明白点原因吗?
Function fun(a As Integer,n As Integer) As Integer
Dim m As Integer
While a >= n
a = a - n
m = m + 1
Wend
fun = m
End Function
该函数的返回值是__
能给说明白点原因吗?
Function fun(a As Integer,n As Integer) As IntegerDim m As IntegerWhile a >= na = a - nm = m + 1Wendfun = mEnd Function该函数的返回值是__能给说明白点原因吗?
可以理解为 a mod n ,整除
---补充说明如下---------------
2个数,a和n,只要a>n就循环a-n,计算减了几次累计放在m,m是个结果返回值.
比如a=15 n=4,a>n吧,a-n后 a=11 m=1再来一次,m=2,a=7,再来 m=3,a=3
现在a>n不成立,不再循环,结果m=3就是 a 整除n,15 \4的结果,整数部分.
不过这里有一些问题存在,要求a,n 都>0,如果n
Function Fun(a() As Integer)是什么意思?
Private Sub Form_Click() Dim a As Integer,b As Integer,k As Integer a = 2 b = 4 k = fun((a),b)+fPrivate Sub Form_Click()Dim a As Integer,b As Integer,k As Integera = 2b = 4k = fun((a),b)+fun(a,b)Print kEnd SubPrivate Function fun(n As Integer,m As In
Function fun(a As Integer,n As Integer) As IntegerDim m As IntegerWhile a >= na = a - nm = m + 1Wendfun = mEnd Function该函数的返回值是__能给说明白点原因吗?
英语翻译immune function and subjective as in happy people less troubled by a scrachy throat
in a fun part of
You can eat,have fun ( )learn in this place.A.as well B.also C.too D.as well as
Write as a function of x, if 0
as a function在这句中的意思
The distribution of iron species in PFC solution as a function of basicity was determined in this study to better understand the mechanism of pollutants removal by PFC.
求英语词组的中文意思1.in a fun way2.as many girls as3.nothing like
in a fun part a town 意思
vb题 Private Sub Command 1 _Click()Dim x As Integerx=Val(InputBOX(输入数据))Text1=Str(fun(x)+fun(x)+fun(x))End SubPrivate Function fun(ByRef n As Integer)If n Mod 3=0 Thenn=n+nElsen=n*nEnd Iffun=nEnd Function当
英语翻译in order to have a inverse function,the function must be one-to-one,but why the sine function has a inverse function?
自定小函数function,谁能帮我解释下以下函数?function fun(a,b,c)if a>b thend=aelsed=bend ifif d
vb中如何用函数求100以内偶数的平方和这是我编写的程序,不知道错在哪里了,求指正.Function Fun()Dim a As IntegerDim b As Integerb = 0For a = 1 To 100If a Mod 2 = 0 Thenb = b + a * aEnd IfNext aFun = b
in a fun part of town是什么意思
Swimming is a great fun in summer.
A dog has fun in the sun.