Доброго времени суток. Подскажите, в чем причина неправильной работы программы. Попытался отладить по шагам, кнопки дебаггера недоступны.![]()
package com.javarush.task.task04.task0420;
/*
Сортировка трех чисел
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(reader.readLine());
int b = Integer.parseInt(reader.readLine());
int c = Integer.parseInt(reader.readLine());
int max, min, mean;
if (a>b && a>c)
max = a;
else if (b>a && b>c)
max = b;
else
max = c;
if (a<b && a<c)
min = a;
else if (b<a && b<c)
min = b;
else
min = c;
if (a<max && a>min)
mean = a;
else if (b<max && b>min)
mean = b;
else
mean = c;
System.out.println(max + " " + mean + " " + min);
}
}