Average, max, and min program in C

前端 未结 8 679
梦毁少年i
梦毁少年i 2021-01-21 02:55

So I\'m coding in C, and I need to come up with code that will take n numbers from the user, and find their minimum, maximum, average, and sum of squares for for their values. S

8条回答
  •  生来不讨喜
    2021-01-21 03:08

    Assume your first number in the list as the minimum and maximum. Compare every next character with the current minimum and the current maximum and update accordingly.

提交回复
热议问题