91.5k views
3 votes
Write a program that fills out a two dimensional array of size 10 by 10 with random integers ranging from 0 through 99 and then finds out the largest item in the array.

User Ratsbane
by
4.6k points

2 Answers

3 votes

Answer:

Step-by-step explanation:

#include using namespace std;int averageGrades(int sum,int size);/********************************************************************** * main * prompt *******...

User Sooniln
by
4.5k points
4 votes

This program is for a 10 by 10 array. It accepts random numbers from 0 to 99.

Step-by-step explanation:

After accepting the number it prints the largest number.

private static int[] generateArray(int min, int max) {

Random rd = new Random();

int randomSize = min + rd.nextInt(max);

System.out.println("Random array size: " + randomSize);

int[] array = new int[randomSize];

for (int i = 0; i < randomSize; i++) {

array[i] = min + rd.nextInt(max);

}

return array;

}

User Paul Rene
by
4.9k points