0% found this document useful (0 votes)
28 views1 page

15

Uploaded by

Ayush Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views1 page

15

Uploaded by

Ayush Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

import java.util.

*;
class p15
{
void mains()
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter rows :");
int r=sc.nextInt();
System.out.println("Enter columns :");
int c=sc.nextInt();
int arr[][]=new int[r][c];int no=0;
System.out.println("Enter Elements :");
for(int i=0;i<r;i++)
{
for(int j=0;j<c;j++)
{
arr[i][j]=sc.nextInt();
}
}

System.out.println("Double Dimensional Array :");


for(int i=0;i<r;i++)
{
for(int j=0;j<c;j++)
{
System.out.print(arr[i][j]+" ");
}
System.out.println();
}

for(int i=0;i<r;i++)
{
int p=0;int m=0;int sum=0;
sum=arr[i][0];
for(int j=0;j<c;j++)
{
if(sum>arr[i][j])
sum=arr[i][j];
p=j;
m=arr[i][0];
for(int k=0;k<c;k++)
{
if(m<arr[k][p])
m=arr[k][p];
}
if(sum==m)
System.out.println("Saddle Point : " +sum);
}}
}
}

You might also like