Objective : Learn to use array and combine with for and while loops to implement some operations. 8.1 Write a program that generates 100 random numbers between 1 to 50, then outputs these 100 numbers, the count of each number, and calculates the mean, mode, median, and standard deviation of these numbers.
Hint: Mean: The mean is the average value of numbers.
Mode: The mode in a set of data is the value that appears most frequently.
Median: The median is the middle value in a dataset when it is arranged in ascending or descending order. If there is an even number of data points, the median is the average of the two middle values.
Standard Deviation: square the difference between each number and the mean, sum them up, and then take the square root of the average.
Output:
8.2 Continuing from the previous question, write a program to separate these 100 numbers into odd and even, and output them in ascending order.
Output :
繳交格式及規定 : 程式重點地方請加註解,給分也會酌量參考註解。 請繳交 .c 檔即可。 c 檔的檔名一律統一,以學號為檔名壓縮成一個以學號為名的壓縮檔 上傳, 上傳請一律繳交壓縮檔。