小游戏(石头剪刀布)
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("请输入:");
int a = sc.nextInt();
int random=(int)(Math.random()*3)+1;
System.out.println(random);
boolean i = (a == 1 && random == 3)
|| (a == 2 && random == 1)
||(a == 3 && random == 2);
// a=石头, b=剪刀, c=布。
if (a == random){ //平局
System.out.println("平局");
}else if (i) {
System.out.println("你赢了");
} else {
System.out.println("你输了");
}
王爽《汇编第二版》实验9
Delphi 文件操作资料
根据条件改变cxGrid行与列颜色
汇编笔记总结 之 跳转
汇编笔记之三 第一个程序
汇编笔记之四 包含多个段的程序
汇编中的数据类型
FastReport 参数的使用
Winform:SaveFileDialog使用(数据导出示例)