It works for distinct input but doesn't when some inputs match.
Im using the scanner class to take input. Im trying to write a code that checks for the case when either of the largest, secondlargest and thirdlargest variables are equal. The use of any data structure is not allowed.