22 5 students of a computer class, to give a Java project progress report speech, now take random ranking to report. Please enter 5 sequence numbers of the same sequential order, and then show a random sequence.
[Requirement]:(1) The class number of 5 students is saved in array, and the final random ranking is also saved in array.(2) The ranking of 5 students is random, that is, the ranking order is different every time the same data is input. [Tip]: Go through each element in the number group in turn, randomly generate a subscript between [0,5), let the current element and the element at the position of the subscript exchange. Random number subscript can refer to Math.random0 and other methods.
1 Short Answer
[Example] Please enter the student numbers of each of the five students in sequence :
7 13 29 38 41
The lecture order is(each run here is different, only one possible result is shown here) :29 7 41 13 38