answersLogoWhite

0


Best Answer

/* using ellipses (...) to indicate tabs for clarity */

double largest (double *array, int M, int N) {

... int i, j;

... double *element;

... double answer = array[0][0];

... for (i=0; i<M; i++) {

... ... for (j=0; j<N; j++) {

... ... ... element = array + i*M + j;

... ... ... if (*element > answer) answer = *element;

... ... }

... }

... return answer;

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program in c to find the largest no out of a matrix of order mn?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you write a program in c plus plus to check if an array is symmetric?

To determine if an array is symmetric, the array must be square. If so, check each element against its transpose. If all elements are equal, the array is symmetric.For a two-dimensional array (a matrix) of order n, the following code will determine if it is symmetric or not:templatebool symmetric(const std::array& matrix){for (size_t r=0 ; r


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


Write a program which reads names of students and their telephones from a file and produce a linked list ordered in alphabetical order by the surname of the student?

write a program which reads names of students and their telephones from a file and produce a linked list ordered in alphabetical order by the surname of the student.


A C program using dynamic memory allocation to sort n names in ascending order?

Writing a C program that uses dynamic memory allocation to sort names in ascending order is a typical computer science assignment. To write this program, you must be in UNIX.


C program to read and print a scalar matrix?

Here is the C program to check whether the inputted matrix is scalar matrix or not. ( its not my creation, its get from other website,am not check) #include&lt;stdio.h&gt; #include&lt;conio.h&gt; int main() { int a[10][10],i,j,m,n,f=0; printf("Enter the order of the matrix\n"); scanf("%d%d",&amp;m,&amp;n); printf("Enter the matrix\n"); for(i=0;i&lt;m;i++) { for(j=0;j&lt;n;j++) { scanf("%d",&amp;a[i][j]); } } if(m!=n) { printf("The matrix is not identity"); } else { for(i=0;i&lt;m;i++) { for(j=0;j&lt;n;j++) { if((i==j&amp;&amp;a[i][j]!=a[0][0])(i!=j&amp;&amp;a[i][j]!=0)) { printf("The matrix is not scalar\n"); f=1; break; } } if(f==1) { break; } } if(f==0) { printf("The matrix is scalar\n"); } } getch(); return 0; }

Related questions

How are computer simulation estimated in order of size?

A common method is to grade them by the order of the largest matrix that has to be factored.


What is the order of The Matrix?

The Matrix The Matrix Reloaded The Matrix Revolutions


How is the order of a matrix found?

The order of a matrix is another way of saying the dimensions of of a matrix. For a two dimensional matrix, the order could be 2 by 2, or 3 by 3, or 32 by 64.


What is mean by order of a matrix?

For a square matrix, the order is the number of rows (or columns).


What is the matrix's in oder?

Restate the question: "What is the order of a matrix?" The order of a matrix tells the number of rows and columns in the matrix. For instance, a matrix with 3 rows and 4 columns is a 3x4 matrix ("three by four"). A square matrix has the same number of rows and columns: 2x2


What is a 4th order matrix?

The order of a matrix with m rows and n columns is (m, n).


Write the 6 divisions of a kingdom in order from largest to smallest?

Phylum, class, order, family, genus, species


C program to fine the largest of 10 given number?

first sort the ten numbers in descending order and print the first number. That will be the largest no


What is order of matrix?

The order of a matrix consisting on m rows and n columns is m x n or (m, n).


How do you write a program in c plus plus to check if an array is symmetric?

To determine if an array is symmetric, the array must be square. If so, check each element against its transpose. If all elements are equal, the array is symmetric.For a two-dimensional array (a matrix) of order n, the following code will determine if it is symmetric or not:templatebool symmetric(const std::array& matrix){for (size_t r=0 ; r


What is the order of the matrix films?

There are three Matrix movies: The Matrix, The Matrix Reloaded, and The Matrix Revolutions. There are also a series of short animated films called The Animatrix. All movies on TopRater: toprater.com/en/movies/objects/2867535-the-matrix-1999


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.