Kod:
import java.util.Scanner;
public class ana {
public static void main(String[] args) {
// TODO Auto-generated method stub
int a;
int b;
int c;
int d;
int x;
int y;
Scanner klavye = new Scanner(System.in);
System.out.print("bir sayı girin");
a = klavye.nextInt();
System.out.print("bir sayı girin");
b = klavye.nextInt();
System.out.print("bir sayı girin");
c = klavye.nextInt();
System.out.print("bir sayı girin");
d = klavye.nextInt();
if (a < b) {
x = a;
} else {
x = b;
}
if (c < d) {
y = c;
} else {
y = d;
}
if (y < x) {
System.out.print("en küçük sayı" + y);
} else {
System.out.print("en küçük sayı" + x);
}
}
}