IDNLearn.com is committed to providing high-quality answers to your questions. Get accurate and detailed answers to your questions from our dedicated community members who are always ready to help.
Sagot :
The program is an illustration of arrays; Arrays are variables that are used to hold multiple values of the same data type
The main program
The program written in C++, where comments are used to explain each action is as follows:
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main(){
//This declares the array
int myArray[4][5];
//This seeds the time
srand(time(NULL));
//The following loop generates the array elements
for(int i = 0; i< 4;i++){
for(int j = 0; j< 5;j++){
myArray[i][j] = rand()%(61)-30;
}
}
//The following loop prints the array elements as grid
for(int i = 0; i< 4;i++){
for(int j = 0; j< 5;j++){
cout<<myArray[i][j]<<" ";
}
cout<<"\n";
}
return 0;
}
Read more about arrays at:
https://brainly.com/question/22364342
Thank you for participating in our discussion. We value every contribution. Keep sharing knowledge and helping others find the answers they need. Let's create a dynamic and informative learning environment together. Thank you for choosing IDNLearn.com. We’re committed to providing accurate answers, so visit us again soon.