public class Chisa { public static void main(String[] args) { int a = 32; int b = 27; int c = 13; int d = 76; int max1 = 0; int max2 = 0; if (a>b && a>c && a>d) max1=a; if (b>a && b>c && b>d) max1=b; if (c>a && c>b && c>d) max1=c; if (d>a && d>b && d>c) max1=d; System.out.println(max1); if(a>max2 && a!=max1) max2=a; if(b>max2 && b!=max1) max2=b; if(c>max2 && c!=max1) max2=c; if(d>max2 && d!=max1) max2=d; System.out.println(max2); } }