Home Assignment On Arrays
Home Assignment On Arrays
Mode Finding
Write a program that will find the mode in an array of integers. The mode of an array of numbers
is the number that occurs maximum times in the array. You will first input the number of
integers, n (1<=n<=100) in the array. It will be followed by n integers that are the elements of
the array. All the integers will be in the range 1 to 1000. Your program will then output the
mode(s) of the array of integers along with the number of times it occurs in the array. If there are
more than one mode, you have to print all the modes in separate lines.
9 53
112344555
5 11
12345 21
31
41
51
4 12334456789
3457
7
1234689
5 1122334455
54321
5
12345
Submission Guideline:
1. First create a folder and rename it with your student id, for example, 1906001 (Most
Important).
2. Rename your .c files using "studentID_problemNo.c" format ( for example, if there are two
problems, then 1906001 will rename the files as 1906001_problem1.c and
1906002_problem2.c). Then, copy only .c files (do not copy .exe or any other type files) of the
assignment inside the folder created in the previous step.
3. Now compress the folder in .zip format and upload the .zip file.
** Do not upload any .rar file. Do not miss point 1. Do not use your name or assignment number
as the folder name.