Question: please make pseudo code and flowchart import java.util.Scanner; public class TestLocation{ public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.print(Enter the number

please make pseudo code

and flowchart

import java.util.Scanner;

public class TestLocation{

public static void main(String[] args) {

Scanner scan = new Scanner(System.in);

System.out.print("Enter the number of rows and columns in the array: ");

int rows = scan.nextInt();

int cols = scan.nextInt();

double d[][] = new double[rows][cols];

System.out.print("Enter the array:");

for(int i=0; i

for(int j=0; j

d[i][j] = scan.nextDouble();

}

}

Location l = locateLargest(d);

System.out.println("The location of the largest element is "+l.maxValue+" at ("+l.row+", "+l.column+")");

}

public static Location locateLargest(double[][] a){

double max = a[0][0];

int row =0 , col=0;

for(int i=0; i

for(int j=0; j

if(max

max = a[i][j];

row = i;

col = j;

}

}

}

Location l = new Location(row,col,max);

return l;

}

}

class Location {

public int row,column;

public double maxValue;

public Location(int row, int column, double maxValue){

this.row = row;

this.column =column;

this.maxValue = maxValue;

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!