火影疾风坛对酒胜率提高技巧揭密。下面是火影疾风坛对酒关于锤子剪子布的计算机程序 Dim MyStr, YourVar, MyVar Randomize Do MyStr = "输入代表锤子、剪刀、布的数字:" & vbCrLf & vbCrLf & _ "1 == 锤子" & vbCrLf & "2 == 剪刀" & vbCrLf & "3 == 布" & vbCrLf & "0 == 结束" YourVar = InputBox(MyStr, "锤子、剪刀、布") If YourVar = "1" Or YourVar = "2" Or YourVar = "3" Then MyVar = Int((3 * Rnd) + 1) MyStr = "你出的是:" Select Case YourVar Case 1 MyStr = MyStr + "锤子" Case 2 MyStr = MyStr + "剪刀" Case 3 MyStr = MyStr + "布" End Select MyStr = MyStr & vbCrLf & "小李出的是:" Select Case MyVar Case 1 MyStr = MyStr + "锤子" Case 2 MyStr = MyStr + "剪刀" Case 3 MyStr = MyStr + "布" End Select MyStr = MyStr & vbCrLf & vbCrLf If MyVar - YourVar = 0 Then MyStr = MyStr + "平手。" ElseIf MyVar - YourVar = 1 Or MyVar - YourVar = -2 Then MyStr = MyStr + "恭喜你!获得*魂。" Else MyStr = MyStr + "你输了。返还*银两!" End If MsgBox MyStr, 64, "锤子、剪刀、布" End If Loop Until YourVar = "0" 以上是源程序,仅供参考。知道了原理后,再来看。锤子、剪子、布,三选一,用概率学来说每个有33.33333····%的概率会被选到,电脑是死板的严格按照公式随机抽取锤子、剪子、布。那好吧,我们刚好能利用它的死板,来达到自己的目的。
火影疾风坛对酒胜率提高技巧揭密。
|