1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
DerKrebs [107]
3 years ago
9

Write a program that creates a two-dimensional array initialized with test data. Use any data type you wish. Declare a two-dimen

sional array of data type char, int, double, or string. Assume the array is declared as follows: const int NUM_ROWS
Computers and Technology
1 answer:
Alona [7]3 years ago
8 0

Question:

Write a program that creates a two-dimensional array initialized with test data. Use any data type you wish. Declare a two-dimensional array of data type char, int, double, or string. Assume the array is declared as follows:  

const int NUM_ROWS = 3,  NUM_COLUMNS = 5;

test data: [10, 1, 1, 1, 1]  [7, 2, 20, 2, 9] [ 3, 3, 3, 3, 5]

Answer:

The program in C++ is as follows:

#include<iostream>

using namespace std;

int main(){

const int NUM_ROWS = 3, NUM_COLUMNS = 5;

int MyArray[NUM_ROWS][NUM_COLUMNS] = {{10, 1, 1, 1, 1},{7, 2, 20, 2, 9},{3, 3, 3, 3, 5}};

return 0;

}

Explanation:

To answer this question, we make use of the following parameters

Array name: MyArray

Array datatype: integer

The explanation is as follows:

This declares the array dimensions

const int NUM_ROWS = 3,  NUM_COLUMNS = 5;

This declares and initializes the array with the test data

int MyArray[NUM_ROWS][NUM_COLUMNS] = {{10, 1, 1, 1, 1}, {7, 2, 20, 2, 9}, {3, 3, 3, 3, 5}};

You might be interested in
The ACT science test takes___minutes.<br> A. 45<br> B. 30<br> C. 35<br> D. 60
Masja [62]

Answer:

a

Explanation:

8 0
3 years ago
Read 2 more answers
What will the document.write() statement display, given the following code snippet? var scores = new Array[94, 90, 88, 82, 73, 7
astra-53 [7]

Answer:

There are 7 scores recorded. The dropped score is 75

Explanation:

The code snippet above prints through the document.write() function. the output prints the string serving as the argument, and makes use of variables (lgth) and expression also (scores [lgth -1]). what it does is. From the point where it sees +lgth+, it checks the value, which is 7. And when it sees scores [lgth-1] it evaluates it to 75. Hence, the string above is produced.

4 0
3 years ago
5.18 LAB: Output numbers in reverse Write a program that reads a list of integers, and outputs those integers in reverse. The in
Rina8888 [55]

Answer:

In C++:

#include<iostream>

#include<vector>

using namespace std;

int main(){

   int len, num;

   vector<int> vect;

   cout<<"Length: ";

   cin>>len;  

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

       cin>>num;

   vect.push_back(num);}

   vector<int>::iterator iter;

   for (iter = vect.end() - 1; iter >= vect.begin(); iter--){

       cout << *iter << ", ";}    

}

Explanation:

This declares the length of vector and input number as integer

   int len, num;

This declares an integer vector

   vector<int> vect;

This prompts the user for length  

cout<<"Length: ";

This gets the input for length  

   cin>>len;  

The following iteration gets input into the vector

<em>    for(int i = 0; i<len;i++){</em>

<em>        cin>>num;</em>

<em>    vect.push_back(num);}</em>

This declares an iterator for the vector

   vector<int>::iterator iter;

The following iterates from the end to the beginning and prints the vector in reverse

<em>    for (iter = vect.end() - 1; iter >= vect.begin(); iter--){</em>

<em>        cout << *iter << ", ";}</em>

<em />

<em />

6 0
3 years ago
2. Select the things you can do when working with rows in columns in a spreadsheet:
Kay [80]
I think you can do all of those things to rows and columns when working with a spreadsheet.
5 0
3 years ago
A wireless network was recently installed in a coffee shop and customer mobile devices are not receiving network configuration i
siniylev [52]

Answer:

make sure the DHCP server is functional

Explanation:

5 0
3 years ago
Other questions:
  • What is the size of the opening in the camera that the light passes through?
    9·2 answers
  • How can improving one’s reasoning skills also improve one’s performance on the job?
    12·2 answers
  • Which of the following is a school-to-work program that provides the student with paid employment, school credit, and school gra
    7·2 answers
  • What hex value is the standard indicator for jpeg graphics files?​?
    6·1 answer
  • "Currency" is a field data type ,it represents Date or time values<br> True or false tho?
    12·1 answer
  • Alisa Miller claims that today's college graduates:
    7·1 answer
  • A computer can function in the absence of software true or false​
    15·2 answers
  • What is the syntax of an of if statement
    13·1 answer
  • How long does it take to send a 19 MiB file from Host A to Host B over a circuit-switched network, assuming:
    14·1 answer
  • What is a good theme statement for the short Pixar film "bao"?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!