¬† ¬† ¬† ¬† ¬†

# Linux.com

• Do you means array of number (integer))? If so, perhaps your array should be look like this in C/C++:

int num[5][5] =
{
{ -1, 12, 23, 4, 15 },
{ 16, 57, -8, 19, 0, },
{ 14, 22, -13, -14, 55 },
{ 10, 0, 2, 1, 20 },
{ 11, 22, -23, 14, 96 }
};

This is a 5x5 array of int, To determine the minimum value of 3rd row, you can use this loop:

int i, a, b;

a = num[2][0];
for (i = 1; i < 5; i++) {
b = num[2][i];
if ( a > b)
a = b;
}

after the loop end, the minimum value is now stored in a, and so with to find maximum value in a column, just change the row index and a more than '>' to less than '>'. Remember that C/C++ array always indexed from 0.

a = num[0][1];
for (i = 1; i < 5; i++) {
b = num[i][1];
if (a > b)
a = b;
}

Unfortunately i don't understand with 'triangle', but i hope this example give you a point to start.... AND I CAN'T WRITE CORRECT CODES HERE because it maybe re-formatted by this text-form.

 Answered by ajhwb 5 years ago 0 1
• nope

 Answered by ajhwb 5 years ago 0 0
• Hi Ardhan Madras ..and thanks for your answer .but when i try to run this program"with the Code Blocks compiler" an error message appears pointing to the statement
b=num[2]; saying that{ invalid conversion from int * to int}
so why is that? also there must be 2 loops instead of one ?

 Answered by linuxstarr 5 years ago 0 0
• the text from don't allow me to write such code, so use this link:

[url]http://pastebin.com/vZ6yhhT3[/url]

I will recomendeed you first to learn how to compile a program by not using an IDE such code::block, try to compile your code from command line, see your compiler documentation. That will help you to understand about the compiler and compilation itself.. good luck!

 Answered by ajhwb 5 years ago 0 1
• Why does this sound an awful lot like a homework assignment?

 Answered by gomer 5 years ago 1 0
• I think Adam is right

 Answered by kunal 5 years ago 0 0
Questions from category Internet
In Internet, asked by samir77 2 weeks ago
In Internet, asked by Arunprabha 2 weeks ago
In Internet, asked by doug_engel@yahoo.com 4 weeks ago
In Internet, asked by EFH-007 5 weeks ago
In Internet, asked by jamesolive1234 6 weeks ago

### Latest Questions

 I have two files file1 having (ip STRING,click_date string,year int, month int, day int) and file2 having (ip STRING,click_date string, min_sess_dur int, max_sess_dur int, year int, month int, day int) Applications How do I install Brother MFC-490CW printer drivers? Drivers How do I install Linux Desktop Hi i am interested lot to learn the embedded linux and the kernel Embedded/Mobile Using Ubuntu-doing a raspberry pi project with retropie. Storage

### Upcoming Linux Foundation Courses

1. LFD211 Introduction to Linux for Developers
08 Dec » 09 Dec - Virtual
08 Dec » 11 Dec - Virtual
3. LFD331 Developing Linux Device Drivers
15 Dec » 19 Dec - Virtual

View All Upcoming Courses

### Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.