import java.util.Random;
import java.util.Scanner;
public class dars {
public static Scanner sc=new Scanner(System.in);
public static void main(String[] args) {
Random random=new Random();
int a=Math.abs(random.nextInt()%100);
while (!tekshirish(a)){
}
}
public static boolean tekshirish(int m){
int f= sc.nextInt();
if(f==m){
System.out.println("To'g'ri");
return true;
}
else {
if (f>m) System.out.println("Katta son kiritdigiz");
else System.out.println("Kichik son kiritdigiz");
return false;
}
}
}
Do'stlaringiz bilan baham: |