Home > Back-end >  The output is greater than the average number
The output is greater than the average number

Time:03-09

Ask bosses, this second output is greater than the average number of zha get

CodePudding user response:

Int a [20], TMP=0;
The second line, enter the number of saved to a [20], calculate the average cycle after the comparison, if is greater than the average, tmp++, final output TMP is the number of

CodePudding user response:

You need to use an array, not only b to record the input number, after calculating the average, the traverse over the array, the number of greater than average
  • Related