answersLogoWhite

0


Best Answer

importjava.io.*;

classsaddle

{

publicstaticvoidmain(Stringargs[])throwsIOException

{

inti,k,j,c1=0,t=0,c2=0,z=0;

BufferedReader br=newBufferedReader(newInputStreamReader(System.in));

System.out.println("enter the number of rows in the matrix:");

intn=Integer.parseInt(br.readLine());

System.out.println("enter the number of columns in the matrix:");

intm=Integer.parseInt(br.readLine());

inta[][]=newint[n][m];

System.out.println("enter the elements of the matrix:");

for(i=0;i<n;i++)<span="">

{

for(j=0;j<m;j++)<span="">

a[i][j]=Integer.parseInt(br.readLine());

}

System.out.println("matrix is:");

for(i=0;i<n;i++)<span="">

{

for(j=0;j<m;j++)<span="">

System.out.print(a[i][j]+" ");

System.out.println();

}

for(i=0;i<n;i++)<span="">

{

for(j=0;j<m;j++)<span="">

{

z=a[i][j];

c1=0;

c2=0;

for(k=0;k<m;k++)<span="">

{

if(z<=a[i][k])

c1++;

}

for(k=0;k<n;k++)<span="">

{

if(z>=a[k][j])

c2++;

}

if(c1==m&&c2==n)

{

t=1;

System.out.println("saddle pt="+z);

}

}

}

if(t!=1)

System.out.println("there is no saddle point");

}

}

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you make a program to find out the saddle point in a matrix?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the Matrix Pill?

The Matrix Pill is a program to find the person still "jacked in" to the Matrix world


How do you Write A program in c language for checking a diagonal matrix?

Write a program in c++ that take input in a integer matrix of size 4*4 and find out if the entered matrix is diagonal or not.


How do you write a java program to find the ad joint of a matrix?

bgfygfrhjyuyhh


Write a C program to find sum of 3 matrices?

matrix


Write a C program using dynamic memory allocation to find the sum of elements of a matrix?

Did you know that memory allocation is not needed to display the matrix? However, the C program is to find the sum of all the elements.


Write a c program to find eigenvalue of a matrix?

Yes, do write. That's what you always have to do when you have got a homework-program.


How do you write a java program to find the transpose of the matrix for the given elements?

You basically write a nested for loop (one for within another one), to copy the elements of the matrix to a new matrix.


A c program to find maximum number in a 3 by 3 matrix?

int matrix[][]; // the matrix to find the max in int max = matrix[0][0]; int r,c; for(r = 0; r &lt; 3; ++r) { for(c = 0; c &lt; 3; ++c) { if(matrix[r][c] &gt; max) { max = matrix[r][c]; } } } // max is now the maximum number in matrix


What is matrix programming in C programming?

C Examples on Matrix OperationsA matrix is a rectangular array of numbers or symbols arranged in rows and columns. The following section contains a list of C programs which perform the operations of Addition, Subtraction and Multiplication on the 2 matrices. The section also deals with evaluating the transpose of a given matrix. The transpose of a matrix is the interchange of rows and columns.The section also has programs on finding the trace of 2 matrices, calculating the sum and difference of two matrices. It also has a C program which is used to perform multiplication of a matrix using recursion.C Program to Calculate the Addition or Subtraction & Trace of 2 MatricesC Program to Find the Transpose of a given MatrixC Program to Compute the Product of Two MatricesC Program to Calculate the Sum & Difference of the MatricesC Program to Perform Matrix Multiplication using Recursion


Find directed graph that has the adjacency matrix?

Find directed graph that has the adjacency matrix Find directed graph that has the adjacency matrix


Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix?

Sp[[Q/Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix|Answer]]ell chec[[Q/Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix&amp;action=edit&amp;section=new|Answer it!]]k your answe[[Q/Discuss:Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix|Disc]][[help/answering questions|guidelin]]Spell check your answeresussionr[[help/signing in|full benefits]] Save C[[Q/Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix|Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 ]][[Q/Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix&amp;action=edit&amp;section=new|Answering 'Write a 8085 microprocessor program to find A inverse and A transpose if A is a 3x3 matrix?']]matrix?ancel[[Q/How many animals are in West Texas|How many animals are in West Texas?]][[Q/How do you increase the number of four wheelers vehicles for servicing in a Service workshop|How do you increase the number of four wheelers vehicles for servicing in a]][[Q/How do you increase the number of four wheelers vehicles for servicing in a Service workshop|How do you increase the number of four wheelers vehicles for servicing in a Service workshop?]] Service workshop?[[Q/How do you increase the number of four wheelers vehicles for servicing in a Service workshop|How do you increase the number of four wheelers vehicles for servicing in a Service workshop?]]More Q&amp;A


How do you find original matrix from its inverse matrix?

To find the original matrix of an inverted matrix, simply invert it again. Consider A^-1^-1 = A^1 = A