Use the beating method. First find any number to stand on the stage, and compare the second number with it, and the winner (larger number) stays on the stage. Then go up to the third number, compare the size with the people on the stage (the winner just now), the winner will stay on the stage, and the loser will step down. From now on, each number will be compared with the number left on the stage at that time, until everyone has come to the stage to compare. The last one left on the stage is the champion. This is the "fighting arena algorithm".
The way of thinking about this question is as follows:
Notice:
Array name [constant expression], the constant expression can include constants and symbolic constants, but cannot contain variables. In other words, the C language does not allow dynamic definition of the size of the array, that is, the size of the array does not depend on the value of the variable during the running of the program.