N is any integer value double arrayDistances[N][N+1];
every row of the multidimensional array consists of a number of doubles
and I have wrote a function to calculate the largest one .
1 2 3 4 5 6 7 8 9 10 11
double theLargest(double d[], int n){//takes an array of doubles as an argument also takes n number of elements
double largest = d[0];
for(int i = 0 ; i<n ; i++){
if(d[i] > largest){
largest = d[i];
}
}
return largest;
}
My question is how I can pass one row at a time from the multidimensional array and find the largest from that one row and store into some other array like this .