è°ä¼åç³å¤´åªåä¸çå·¥ç¨ï¼VBï¼è¦è½è¿è¡ç
æä¼ï¼
æºç
Dim h As String
Private Sub Command1_Click()
Call Label1_Click
ç³å¤´1.Visible = True
If h = 1 Then
ç³å¤´2.Visible = True
Label3.Visible = True
End If
If h = 2 Then
åªå2.Visible = True
Label4.Visible = True
End If
If h = 3 Then
å¸2.Visible = True
Label5.Visible = True
End If
End Sub
Private Sub Command2_Click()
Call Label1_Click
åªå1.Visible = True
If h = 1 Then
ç³å¤´2.Visible = True
Label5.Visible = True
End If
If h = 2 Then
åªå2.Visible = True
Label3.Visible = True
End If
If h = 3 Then
å¸2.Visible = True
Label4.Visible = True
End If
End Sub
Private Sub Command3_Click()
Call Label1_Click
å¸1.Visible = True
If h = 1 Then
ç³å¤´2.Visible = True
Label4.Visible = True
End If
If h = 2 Then
åªå2.Visible = True
Label5.Visible = True
End If
If h = 3 Then
å¸2.Visible = True
Label3.Visible = True
End If
End Sub
Private Sub Form_Load()
End Sub
Private Sub Label1_Click()
ç³å¤´1.Visible = False
ç³å¤´2.Visible = False
åªå1.Visible = False
åªå2.Visible = False
å¸1.Visible = False
å¸2.Visible = False
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
Dim x As Integer
Randomize
x = Int(Rnd() * 3) + 1
h = x
End Sub
èªå·±æ·»æ§ä»¶ï¼ï¼
选择与循环:玩家与计算机一起玩剪刀、石头、布的布源布的源码游戏,分别由0、代码1、石头石2代表剪刀石头布。剪刀剪刀玩家需要通过
代码如下图所示。布的布源中长线源码代码(code)是源码程序员用开发工具所支持的语言写出来的源文件,是代码一组由字符、符号或信号码元以离散形式表示信息的明确的规则体系。
代码设计的老鼠仓指标源码原则包括唯一确定性、标准化和通用性、可扩充性与稳定性、便于识别与记忆、力求短小与格式统一以及容易修改等。天下无双源码
源代码是代码的分支,某种意义上来说,源代码相当于代码。
现代程序语言中,源代码可以书籍或磁带形式出现,但最为常用格式是文本文件,这种典型格式的目的是为了编译出计算机程序。计算机源代码最终目的是将人类可读文本翻译成为计算机可执行的二进制指令,这种过程叫编译,它由通过编译器完成。
剪刀石头布c++简单版源代码
int main()
{
int a;
srand((unsigned)time(0));
string caiquan[3]={ "jiandao","shitou","bu"};
cout << "1:jiandao"<<endl<<"2:shitou"<<endl<<"3:bu"<<endl;
cin >> a;
int b=rand()%3;
cout <<"computer:"<<"caiquan[b]<<endl;
b++;
if(a==b)
cout <<"Ping Shou";
else if(a-b==-2||a-b==1)
cout <<"You win!";
else
cout <<"You lose!"
return 0;
}
2024-12-26 12:27
2024-12-26 11:38
2024-12-26 10:37
2024-12-26 10:30
2024-12-26 10:27