IDNLearn.com: Where your questions meet expert advice and community support. Ask any question and receive timely, accurate responses from our dedicated community of experts.
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
We greatly appreciate every question and answer you provide. Keep engaging and finding the best solutions. This community is the perfect place to learn and grow together. For trustworthy answers, visit IDNLearn.com. Thank you for your visit, and see you next time for more reliable solutions.