import java.io.*;
import java.util.*;
class Check_number {
public static void main(String[] args)
{
BufferedReader input_s = new BufferedReader(new InputStreamReader( System.in ) );
int num = (int)( Math.random() * 100 ) + 1;
while(true)
{
System.out.print( "1~100 »çÀÌÀÇ ¼ýÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä = " );
try {
String input_string = input_s.readLine();
int input_num = Integer.parseInt(input_string);
if( input_num > num ) { System.out.println( "Å« °ªÀÔ´Ï´Ù." ); }
else if ( input_num < num ) { System.out.println( "ÀÛÀº °ªÀÔ´Ï´Ù." ); }
else { System.out.println( "Á¤´äÀÔ´Ï´Ù." ); break; }
}
catch( IOException ex ) {
ex.printStackTrace();
}
}
}
}
|