Waterloo Computing Test Questions

Hello all,

I am taking the Waterloo Computing Test next spring and wanted to start preparing now because im a very basic programmer. I was looking at last years test and was trying to write some of the programs but struggled. I'm able to do the first program no problem. I know how to do the second but can't read in different chars from the same line. The third,fourth and fifth i'm stumped. If you can help out by posting the answers for 2 - 5 that would be great. I learn very fast from seeing the answer and it helps me understand the approach to take. Thanks for any help.

Start by writing the steps the program needs to take to solve the problem.
Begin at a high level and then refine the steps by filling more details.
Pick one and do that first, then move on to the next one.
So far you haven't posted any specific questions or details about your problems.

How do you find the most frequent number? Can you use the same technique (with a slight modification) to find the second most frequent?

One thing I suggest to improve the code is to use a variable to define the size of the arrays and use the length of the array to control the looping. You should NOT hard code numbers like 1001, 1000 and 999 all over the code. That makes the code very hard to change if you want to change the size of the arrays.