Package learning;
Import java.util.*;
public class guess{
public static void Main (String [] args) {
int j=0;
while (j<4) {
int count1=0;
int count2=0;
int count3=0;
for (int i=1;i<11;i++) {
System.out.println ("-------Scissors game-------");
System.out.println ("+i+", "Bureau");
SYSTEM.OUT.PRINTLN ("Please Punch: (1. Scissors 2. Stone 3. Cloth)");
Scanner in = new Scanner (system.in);
int person = In.nextint ();
int computer = (int) (Math.random () *3+1);
String marks = "fist";
String Marks2 = "fist";
Switch (person) {
Case 1:
Marks = "scissors";
Break
Case 2:
Marks = "stone";
Break
Case 3:
Marks = "cloth";
Break
}
Switch (computer) {
Case 1:
MARKS2 = "scissors";
Break
Case 2:
MARKS2 = "stone";
Break
Case 3:
Marks2 = "cloth";
Break
}
if (person==computer) {
System.out.println ("Draw," + "You are out of the" +marks+ ", the computer is" +MARKS2 ");
Count1 =count1+1;
}
else if (person==1&&computer==2| | person==2&&computer==3| | Person==3&&computer==1) {
System.out.println ("You Lose," + "You are out of the" +marks+ ", the computer is" +MARKS2 ");
Count2 =count2+1;
}
else {
System.out.println ("You win," + "You are out of the" +marks+ ", the computer is" +MARKS2 ");
Count3 =count3+1;
}
System.out.println ("You won the +count3+" bureau, "+" you lost the "+count2+" bureau, "+" Draw "+count1+" bureau ");
}
if (Count3>count2) {
System.out.println ("Congratulations, you won!" ");
Break
}
if (Count3<count2) {
System.out.println ("I'm sorry, you lost!") ");
Break
}
if (Count3==count2) {
System.out.println ("Qifengduishou, Draw! Let's do it again! ");
j + +;
Continue
}
}
}
}
Java----Scissors (10 innings)