问个问题 问题:以论坛可用分为例,本人的可用分,在4天内,平均每天要发多少帖(200分的帖,不够取上限)?平均要结多少帖?才能散尽可用分。请给个算法... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 实际上,在代码编写时需要使用do loop穷举,直到分数为0即可。 can u share me some codes? 无聊一下Private Sub Command1_Click() Dim i As Integer Dim lngFen As Long Dim lngSanFen() As Long Dim intNum As Integer lngFen = Text1.Text + 40 i = 0 Do ReDim Preserve lngSanFen(i) If lngFen > 200 Then lngSanFen(i) = 200 Else lngSanFen(i) = lngFen End If ' Debug.Print lngSanFen(i) lngFen = lngFen - lngSanFen(i) + (lngSanFen(i) \ 2) i = i + 1 Loop Until lngFen = 0 intNum = Round(i / 4 + 0.5, 0) For i = 0 To UBound(lngSanFen) If i Mod intNum = 0 Then Debug.Print "第" & i \ intNum + 1 & "天" End If Debug.Print lngSanFen(i) Next iEnd Sub Do While Not sTotalPoint = 1 If sTotalPoint > 200 Then iCtr = Int(sTotalPoint / 200) iRtn = iCtr * 100 sTotalPoint = sTotalPoint - iCtr * 200 + iRtn jCtr = jCtr + iCtr Else iCtr = sTotalPoint / sTotalPoint - 1 jCtr = jCtr + iCtr End If Loop写到一半,被通知要去顾客那了,各位请补上。晚上来结贴。 vbsdim idxdim totaltotal = 2000idx = 0while total >= 200 total = total - 100 idx = idx + 1 msgbox idx & " - " & totalwendwhile total > 0 total = fix(total/2) idx = idx + 1 msgbox idx & " - " & totalwend Treeview 与sql绑定的问题.实在晕呀.小弟能力有限 我想打开服务器上的word文档,服务器有用户密码,文件夹也开了共享,如何打开word 100求源代码或者编程思路!!!! **********怎么会recordcount为-1 简单的VB程序设计算法请教各位大哥!!急!! 如何使用set语句 (100分)求一份测试文档的格式!!!----收到就结贴 真诚求购对文件夹、各种类型的文件、和可执行程序的加密解密的源代码! 还是右键弹出菜单问题??看看哪里有错? 请问FoxPro的数据库用什么引擎,需要安装什么东西? 散粉,小谜题 用access里的VB做数据库管理系统执行问题
Dim i As Integer
Dim lngFen As Long
Dim lngSanFen() As Long
Dim intNum As Integer
lngFen = Text1.Text + 40
i = 0
Do
ReDim Preserve lngSanFen(i)
If lngFen > 200 Then
lngSanFen(i) = 200
Else
lngSanFen(i) = lngFen
End If
' Debug.Print lngSanFen(i)
lngFen = lngFen - lngSanFen(i) + (lngSanFen(i) \ 2)
i = i + 1
Loop Until lngFen = 0
intNum = Round(i / 4 + 0.5, 0)
For i = 0 To UBound(lngSanFen)
If i Mod intNum = 0 Then
Debug.Print "第" & i \ intNum + 1 & "天"
End If
Debug.Print lngSanFen(i)
Next i
End Sub
Do While Not sTotalPoint = 1
If sTotalPoint > 200 Then
iCtr = Int(sTotalPoint / 200)
iRtn = iCtr * 100
sTotalPoint = sTotalPoint - iCtr * 200 + iRtn
jCtr = jCtr + iCtr
Else
iCtr = sTotalPoint / sTotalPoint - 1
jCtr = jCtr + iCtr
End If
Loop
写到一半,被通知要去顾客那了,各位请补上。晚上来结贴。
dim totaltotal = 2000idx = 0while total >= 200
total = total - 100
idx = idx + 1
msgbox idx & " - " & total
wendwhile total > 0
total = fix(total/2)
idx = idx + 1
msgbox idx & " - " & total
wend