//Scissors//three innings two wins, the computer even wins two innings, or the player even wins two innings, 2 innings ends//the computer wins a game, the player wins a game, 3 innings//a draw, I don't know how many innings will end,//as long as the computer or the player wins 2 innings, then the end, otherwise continue//Break End Loop//continue end Current loop, enter Next loopintCount1 =0;intCount2 =0; for (; ; ) {Console.Write ("Please enter the gesture you want: (scissors: 0, Cloth: 1, Stone: 2)"); intYH =int. Parse (Console.ReadLine ()); Random R=NewRandom (); intDN = R.next (0,3); intJG = YH-DN; if(JG = =-1|| JG = =2) {Count1++; Console.WriteLine ("congratulations on your victory! "); if(Count1 = =2) {Console.WriteLine ("win!! "); Break; } } Else if(JG = =1|| JG = =-2) {Count2++; Console.WriteLine ("You've lost! "); if(Count2 = =2) {Console.WriteLine ("defeat!! "); Break; } } Else{Console.WriteLine ("A Draw! "); }}
Console.ReadLine ();
// One of the monkeys picked a few peaches, each day it ate half of the peaches and one, and on the 10th day there was a peach,// asked how many peaches had been picked;int 1 ; for (int1; i--) { 12;} Console.WriteLine (a);
Console.ReadLine ();
Loop Nesting iterative practice scissors