程序编译通过,为什么运行不了??
import java.util.Scanner;public class A{
public static void main(String[] args){
Scanner s = new Scanner(System.in);
int person = s.nextInt();
int computer = (int)(Math.random()*3)+1;
System.out.println("---出拳游戏---");
System.out.println("请出拳:(1:剪刀 2:石头 3:布)");
String mark = "我";
String mark2 = "我";
switch (person){
case 1:
mark = "剪刀";
break;
case 2:
mark = "石头";
break;
case 3:
mark = "布";
break;}
switch (computer){
case 1:
mark2 = "剪刀";
break;
case 2:
mark2 = "石头";
break;
case 3:
mark2 = "布";
break;}
if (person==computer){
System.out.println("你出的是"+mark+"电脑出的是"+mark2+"pingju");
}
else if(person==1&&computer==2||person==2&&computer==3||person==3&&computer==1){
System.out.println("你出的是"+mark+"电脑出的是"+mark2+"你输了");
}
else {
System.out.println("你出的是"+mark+"电脑出的是"+mark2+"你赢了");
}
}
}