Iterate over a range of Array

N

nicolas

Hello,everybody

I get a problem:

1. Have an Int Array;

2. Run iterate over a range of Array once;

3. Get Minimum result and No.2 minimum result;




--


_________________________________________
ÎÒÈÈ°®ÉîÈëµÄÌÖÂÛ£¡
ÓÐÊÂÇëͬÎÒÁªÏµ£¬
MSN£º (e-mail address removed)


---------
 
G

Greg P.

| Hello,everybody
<snip>

Greetings. Is this a homework assignment, cuz it sure does sound like one.
Make an attempt at writing the code first before posting here, then we'll
help from there. This is not a place for people to hand over solutions.
 
R

Randy Howard

| Hello,everybody
<snip>

Greetings. Is this a homework assignment, cuz it sure does sound like one.
Make an attempt at writing the code first before posting here, then we'll
help from there. This is not a place for people to hand over solutions.

Actually, I'm willing to do it for him, provided he pays me in advance and
provides the email or fax for his professor so I can submit it directly
after I verify the email is valid by contacting the faculty department
office phone number. This extra step is to avoid copying by other
classmates without them paying of course.

$5 per homework problem under 100 lines,
$10 for each problem between 100 and 300 lines
and negotiated pricing for anything over that size
 
N

Nick Austin

Hello,everybody

I get a problem:

1. Have an Int Array;

#define NUM_ELEMENTS 100

int array[ NUM_ELEMENTS ];
2. Run iterate over a range of Array once;

int i;

for ( i = 0 ; i < NUM_ELEMENTS ; o++ )
{
/* do stuff with array[ i ] */
}
3. Get Minimum result and No.2 minimum result;

OK, Start by choosing an algortihm.

Image you are alone on a desert island. A ship arrives
and offers you a ride home if you can solve their problem.
They give you several sheets of paper with lots and lots
of numbers. If you can correctly tell them the largest and
second largest number they will let you board the ship.

What is the process you follow to solve the problem?

Nick.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top