小游戏(石头剪刀布)
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("你输了");
}
vsftpd 创建虚拟用户
Java Web Socket
Linux 命令集合
YII 1.0 上传文件
YII 1.0 扩展第三方类
YII 1.0 发表文章用到的小物件
YII 1.0 增删改查
mysql 日志
YII 1.0 小功能总结