对于我的问题,我需要弄清楚如何使模除问题的剩余部分在visual basic中继续进行另一次计算。这真的很难用词,所以我会试着用一个例子:
用户输入4500。4500 mod 1000 =4次,余数为500。
现在我需要500继续到下一次计算。
500 mod 100 =5
则输出可能为: Boxes of 1000: 4 Boxes of 100: 5
有人能解释一下我如何在Visual Basic中编写类似的问题吗?
发布于 2012-09-19 03:14:21
Dim dividend As Integer = 4500/1000 ' results to 4
Dim remainder As Integer = 4500 Mod 1000 ' results to 500
Dim subdividend As Integer = remainder/100 ' results to 5https://stackoverflow.com/questions/12483369
复制相似问题