[Solved] how to get unequal numbers in java for this program?


This is according to your question and comments in the question that you will have only 3 inputs and you want to find 2nd smallest and you have to use min and max only.
If it is not the case update the question for the correct answer to your intended question.

  int d=a+b+c;
  int e=Math.max(a,Math.max(b,c));
  int f=Math.min(a,Math.min(b,c));
  System.out.println(d-(e+f));

5

solved how to get unequal numbers in java for this program?