Around 07:58pm on Saturday, December 06, 2008 (UK time), jagomaniak scrawled:

> Hi, it's me again. :)
> 
> I'm almost finished with my school project, the only thing I need is
> to find and count such numbers in an array (it's a matrix) that don't
> have bigger or the same number in their surroundings, such as this:
> 
> 1 2 3
> 7 8 5
> 4 2 1
> 
> Is there any efficient and easy way to do it instead of having too
> many 'if's? The matrix is read from a file that is specified by user
> in the command line.

Use two loops, an outer one for the rows, and an inner one for each cell
within the row.

Steve

-- 
 
(o<     www.stevesearle.com
//\     Powered by Fedora
V_/_    No MS products were used in the creation of this message

 20:18:10 up 20 days,  4:19,  1 user,  load average: 0.01, 0.06, 0.07

Reply via email to