Home > Back-end >  The teacher told us to design a guess game. I designed, but can't run, don't know why ask
The teacher told us to design a guess game. I designed, but can't run, don't know why ask

Time:10-10

import java.util.Scanner;

Public class youxi {

Public static void main (String [] args) {
Int daan=66;
System. Out.println (" hey, q, we today to play a number of guessing game, you guess according to I provide the scope of the ha, guessed prize!" );
System. The out. Println (" hey hey, that,, you just guess a number first, ");
Scanner m=new Scanner (System. In);
If (m & gt; Daan) {
System. Out.println (" your mama a silly, you guess! Guess again!" );
}
Else if (m & lt; Daan) {
System. Out.println (" you are a silly carving, you he niang small guess, guess again!" );
}
The else
{
System. Out.println (" oh my god, this young man, you guessed it! You he niang is a genius, come on, labor reward you two slap in the face!" );
}
}
While (daan!=66);

}

CodePudding user response:

Your code changes, note into circulation conditions, remember junction post
 
Public static void main (String [] args) {
Int daan=66;
System. Out.println (" hey, q, we today to play a number of guessing game, you guess according to I provide the scope of the ha, guessed prize!" );
System. The out. Println (" hey hey, that,, you just guess a number first, ");
Scanner scan=new Scanner (System. In);
Int m=0;
While (m! Daan)={
M=scan nextInt ();
If (m & gt; Daan) {
System. Out.println (" your mama a silly, you guess! Guess again!" );
} else if (m & lt; Daan) {
System. Out.println (" you are a silly carving, you he niang small guess, guess again!" );
} else {
System. Out.println (" oh my god, this young man, you guessed it! You he niang is a genius, come on, labor reward you two slap in the face!" );
}
}
}

CodePudding user response:

1/f, reference source is a ghost reply:
your code changes, pay attention to the conditions into the circulation, and remember to post!
 
Public static void main (String [] args) {
Int daan=66;
System. Out.println (" hey, q, we today to play a number of guessing game, you guess according to I provide the scope of the ha, guessed prize!" );
System. The out. Println (" hey hey, that,, you just guess a number first, ");
Scanner scan=new Scanner (System. In);
Int m=0;
While (m! Daan)={
M=scan nextInt ();
If (m & gt; Daan) {
System. Out.println (" your mama a silly, you guess! Guess again!" );
} else if (m & lt; Daan) {
System. Out.println (" you are a silly carving, you he niang small guess, guess again!" );
} else {
System. Out.println (" oh my god, this young man, you guessed it! You he niang is a genius, come on, labor reward you two slap in the face!" );
}
}
}



Are you a lead

CodePudding user response:

1/f, reference source is a ghost reply:
your code changes, pay attention to the conditions into the circulation, and remember to post!
 
Public static void main (String [] args) {
Int daan=66;
System. Out.println (" hey, q, we today to play a number of guessing game, you guess according to I provide the scope of the ha, guessed prize!" );
System. The out. Println (" hey hey, that,, you just guess a number first, ");
Scanner scan=new Scanner (System. In);
Int m=0;
While (m! Daan)={
M=scan nextInt ();
If (m & gt; Daan) {
System. Out.println (" your mama a silly, you guess! Guess again!" );
} else if (m & lt; Daan) {
System. Out.println (" you are a silly carving, you he niang small guess, guess again!" );
} else {
System. Out.println (" oh my god, this young man, you guessed it! You he niang is a genius, come on, labor reward you two slap in the face!" );
}
}
}

Good dalai! Thank you for your bosses

CodePudding user response:

reference nothing less to stay up late reply: 3/f
Quote: 1/f, reference source is a ghost reply:
your code changes, pay attention to the conditions into the circulation, remember junction post!
 
Public static void main (String [] args) {
Int daan=66;
System. Out.println (" hey, q, we today to play a number of guessing game, you guess according to I provide the scope of the ha, guessed prize!" );
System. The out. Println (" hey hey, that,, you just guess a number first, ");
Scanner scan=new Scanner (System. In);
Int m=0;
While (m! Daan)={
M=scan nextInt ();
If (m & gt; Daan) {
System. Out.println (" your mama a silly, you guess! Guess again!" );
} else if (m & lt; Daan) {
System. Out.println (" you are a silly carving, you he niang small guess, guess again!" );
} else {
System. Out.println (" oh my god, this young man, you guessed it! You he niang is a genius, come on, labor reward you two slap in the face!" );
}
}
}

Good dalai! Thank you bosses

Brothers, since settled, and remember to post

CodePudding user response:

reference source, 4/f, ghost dao reply:
Quote: refer to the third floor nothing less to stay up late reply:

Quote: 1/f, reference source is a ghost reply:
your code changes, pay attention to the conditions into the circulation, and remember to post!
 
Public static void main (String [] args) {
Int daan=66;
System. Out.println (" hey, q, we today to play a number of guessing game, you guess according to I provide the scope of the ha, guessed prize!" );
System. The out. Println (" hey hey, that,, you just guess a number first, ");
Scanner scan=new Scanner (System. In);
Int m=0;
While (m! Daan)={
M=scan nextInt ();
If (m & gt; Daan) {
System. Out.println (" your mama a silly, you guess! Guess again!" );
} else if (m & lt; Daan) {
System. Out.println (" you are a silly carving, you he niang small guess, guess again!" );
} else {
System. Out.println (" oh my god, this young man, you guessed it! You he niang is a genius, come on, labor reward you two slap in the face!" );
}
}
}

Good dalai! Thank you bosses

Brothers, since settled, and remember to post.

,,,,,, eldest brother, how to solve? To teach the next?
  • Related