Java do while 循环如何求输入几个数后的最小值

需要用do while 求输入几个数后的最大最小值,如图只能求最大值。求指点。

img

min=1000000

img

有一行写错了,改成 a<min