Question
Java The program has to be similar to this: import java.util.*; import java.io.*; public class HelloWorld{ public static void rcConvert(int[][] ar1, int[][] ar2, int r,
Java
The program has to be similar to this:
import java.util.*; import java.io.*; public class HelloWorld{ public static void rcConvert(int[][] ar1, int[][] ar2, int r, int c){ int i,j; for(i=0; i public static void main(String []args){ int i, j; //for iterating thru the array File inF = new File("file1"); Scanner in = null; try{ in = new Scanner(inF); } catch (Exception e) {System.out.println("Error: " + e);} int r = in.nextInt(); int c = in.nextInt(); //read rows & columns int[][] arr1 = new int[r][c]; //declare the required 2D array int[][] arr2 = new int[c][r]; //declare another array for(i=0; i What i mean is that it has to follow like the patter trying to use short coding instead of heavy code(lot of lines of code)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started