|
-
Oct 28th, 2004, 09:29 PM
#1
Thread Starter
Member
Array Problems
Ok, I spent some time working on these, but I can't seem to think like a programmer yet. Could someone plz reply on how I would solve these problems?
Here are the problems.
1. Given an int num[max]
(we allready know the average)
Find and show the number closest to the average.
ex. 10, 6, 9, 10, 12 It would show 6 and 9, sence the average is 7.
2. Write the code that will find the average, then show the average and all of the numbers above the average.
ex. 10, 6, 9, 10, 12 It would show 7, 9, 10, 10, 12 but not the 6 because it is less than the average.
Plz help, this is for my computer science class, and it's due tomarow, and I can't seem to figure these 2 out.
I'm a noobie when it comes to programming, please teach me, so I can also have the advantages of making my own programs, and money.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|