import java.io.*; import java.util.Random; public class number { public static void main(String args[]) throws NumberFormatException, IOException{ Random r = new Random(); int x = r.nextInt(100) + 1; BufferedReader scn = new BufferedReader(new InputStreamReader(System.in)); int z, counter = 0; do { System.out.print("Угайдате число: "); z = Integer.parseInt(scn.readLine()); counter++; if (z == 0) break; if (z > x) System.out.println("Много"); if (z < x) System.out.println("Мало"); } while ((z != x) && (counter < 7)); if (z == x) System.out.printf("Вы выйграли, число попыток: %d", counter); else System.out.println("Вы проиграли!"); } }