猜拳游戏:
import java.util.Scanner;
public class Scissors_Stone_Cloth{
public static void main(String[] args){
if(true){
System.out.println("**********************");
System.out.println("——————进入猜拳游戏——————");
System.out.println("请出拳:(1是剪刀,2是石头,3是布)");
Scanner sc=new Scanner(System.in);
int person=sc.nextInt();
int computer=(int)(Math.random() * 3)+1;
String per="用户";
String com = "电脑";
switch(person){
case 1:
per="剪刀";
break;
case 2:
per="石头";
break;
case 3:
per="布";
break;
}
switch(computer){
case 1:
com="剪刀";