public static void main(String[] args) {
int a, b, c, d;
int min = 0;
a = 12;
b = 22;
c = 33;
d = 11;
if(a>b){
min = b;
}
if(min>c){
min = c;
}
if(min>d){
min = d;
}
System.out.println("Наименьшее число "+min);
}
int[] numbers = {9,8,7,6,5,4,3,2,1} ;
int min = numbers[0];
for ( int n : numbers ) {
min = min < n ? min : n;
}
System.out.println("Min = " + min);
int[] numbers = {9,8,7,6,5,4,3,2,1} ;
Arrays.sort(numbers);
int min = numbers[0];
System.out.println("Min = " + min);