VBS类似于ceil的函数

Function ceil(n,m)    
    temp = n/m
    If Int(temp)/temp=1 Then
            ceil=temp
    Else
            ceil=Int(temp)+1
    End If
End Function

msgbox ceil(4,5)

msgbox ceil(5,5)

msgbox ceil(6,5)
msgbox ceil(9,5)

posted on 2012-06-05 13:11  张飞_  阅读(449)  评论(0编辑  收藏  举报

导航