Question: Write a java program to read an integer N (2
Write a java program to read an integer N (2 <= N <= 30) from an input filename input5_01.txt and then
a. Write a function to create an N x N matrix with random integers from the range [10, 99]. Output that matrix to the output filename output5_01.txt.
b. Find the maximum number of each row and each column of the matrix created in part a). Output those number to the same file output5_01.txt.
c. Find all primes in the matrix and output those to same file output5_01.txt.
Note: Do not print out duplicate primes.
Example: Input File input5_01.txt
5
Output File output4_01_1.txt + Part a) 13 56 95 11 16 12 23 25 77 83 19 99 21 86 46 34 66 29 67 42 29 20 50 71 83 + Part b) Max rows: 95 83 99 67 83 Max cols: 34 99 95 86 83 + Part c) 13 11 23 83 19 29 67 29 71
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
