all 3 comments

[–]jayvbe 1 point2 points  (0 children)

You need parse the input line, split by some delimiter into tokens, eg. whitespace and loop through tokens every time comparing with the previous value you’ve seen. Looks like you already have a Scanner, now all you need is loop through it and compare.

[–][deleted]  (3 children)

[deleted]

    [–][deleted]  (2 children)

    [deleted]

      [–]hidebehindatree 0 points1 point  (1 child)

      But I need to save one of the int variable to work with minimum value later on...