五盒攻略网带你了解人品计算器下载 ,希望本文能帮到你。
人品计算器的算法

人品=Asc(你的名字) mod 100得出的
不信你去试试
a的ascII为97所以结果是97
c的最高99
除了作者外没有100人品的人
因为100倍数mod 100为0
作者使用了if 语句所以他有100人品
注: mod 是取余
10 mod 3=1
谁知道人品计算器VB代码?
我的计算器 Option Explicit Dim FocusText As VB.TextBox Dim pd As Boolean Dim x As Double Dim y As Double Dim ch As Integer Private Sub Command1_Click(Index As Integer) On Error Resume Next FocusText.SetFocus If Index SendKeys Index ElseIf Index = 10 Then ch = Index - 10 x = Val(Text1.Text) Text1.Text = "" ElseIf Index = 14 Then y = Val(Text1.Text) Select Case ch Case 0 Text1.Text = x + y Case 1 Text1.Text = x - y Case 2 Text1.Text = x * y Case 3 Text1.Text = x / y End Select ElseIf Index = 15 Then FocusText.SetFocus SendKeys "{BS}" ElseIf Index = 16 Then FocusText.SetFocus SendKeys "." End If End Sub '防止输入多个小数点以及出数字外的其他字符 Private Sub Text1_KeyPress(KeyAscii As Integer) If (KeyAscii 57) And KeyAscii 46 And KeyAscii 8 Then KeyAscii = 0 End If If pd = True And KeyAscii = 46 Then KeyAscii = 0 End If If pd = False And KeyAscii = 46 Then pd = True KeyAscii = 46 End If End Sub '防止 Ctrl + v 粘贴 Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyV And Shift = vbCtrlMask Then Text1.Enabled = False Clipboard.Clear Text1.Enabled = True End If End Sub '防止右键粘贴 Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) If Button = vbRightButton Then Text1.Enabled = False Clipboard.Clear Text1.Enabled = True End If End Sub Private Sub Text1_LostFocus() Set FocusText = Text1 End Sub 界面如下 0为Command1(0)1为Command1(1)依次类推 ←为Command1(15) 小数点为Command1(16) 贴子相关图片: 界面可以到
人品计算器的算法
人品=Asc(你的名字) mod 100得出的
不信你去试试
a的ascII为97所以结果是97
c的最高99
除了作者外没有100人品的人
因为100倍数mod 100为0
作者使用了if 语句所以他有100人品
注: mod 是取余
10 mod 3=1