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
Rashid [163]
1 year ago
7

9.3 code practice

Computers and Technology
1 answer:
ch4aika [34]1 year ago
5 0

The program is an illustration of arrays; Arrays are variables that are used to hold multiple values of the same data type

<h3>The main program</h3>

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:

brainly.com/question/22364342

You might be interested in
Why is it important to have a price assiociated in every product​
artcher [175]

Answer:

The wrong price can also negatively influence sales and cash flow. tbh there is no point to me  

Explanation:

7 0
2 years ago
Read 2 more answers
How do you do this question?
elena55 [62]

Answer:

for (scores.Entry<String, Integer> entry : scores.entrySet()) {

          int value=0; String key="Rambo";

          String k = entry.getKey();

           int v = entry.getValue();

           if (v>value)

           {

               value =v;

           }

           else

           {

               value=value;

           }  

       }

       for( scores.Entry<String, Integer> entry : scores.entrySet())

      {

        if( entry.getValue()==value)            

        System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue());

      }

Explanation:

The above scores are an object of Map type.  And this is a parameter of findUopStudent function. So scores is a Map, and entry is an item. And we get its key and value. Now we compare each value using senteniel method and find the maximum value. Now we iterate through the scores using for the look and check the value of each entry against the maximum value found, and we print out the entry with maximum value. And that is the top student, which is required.  

4 0
3 years ago
Pls help me computer science discoveries
lara31 [8.8K]

Answer:

jdinwoahdjsioadjsakodsiaohdeioajfnsohfujkdshksyfneowjdfikdjiadjsadhnsuidghaiudbnha

Explanation:

3 0
2 years ago
Which statement must be included in a program in order touse a deque container?
dedylja [7]

Answer:

d.#include deque

Explanation:

We have to include deque library in order to use a deque container and the syntax to include is #include<deque>.Deque is a double ended queue which is a sequence container and allows operations of contraction and expansion on both ends of the queue.Double ended queues are a special case of simple queue since in simple queue the insertion is from rear end and deletion is from front end but in deque insertion and deletion is possible at both ends rear and front.

3 0
3 years ago
Which of the following is NOT a safety practice for working near power lines?
dimulka [17.4K]
The answer is use rider posts, when available, to avoid getting too close to the power line. 

I hope this helps!  
5 0
3 years ago
Other questions:
  • Maria found a cupcake recipe on a cooking blog. However, she would like to read comments and suggestions before she begins bakin
    6·2 answers
  • When you’re in the Normal view, what are the visible panes?
    15·2 answers
  • Semiconductors are only somewhat conductive electronic components.<br><br> True or False?
    14·1 answer
  • Which statement is used to create a file object that will append data to an existing file? BufferedWriter salesdata =
    7·2 answers
  • Piers wants to take a course on XML. He is a certified web designer, but he has not used XML before. How can he use XML to impro
    6·1 answer
  • Charts are more effective in attaining attentionthen others methods of presenting data. Do you agree?
    10·1 answer
  • Users who are connecting to an NLB cluster have been complaining that after using the site for a few minutes they are prompted t
    15·1 answer
  • Explain the bad effect and good effect of mobile phone and internet.<br>​
    15·2 answers
  • In the year, , the American Department of Defense put a military research network, called ARPANET online.
    5·1 answer
  • Edit the program provided so that it receives a series of numbers from the user and allows the user to press the enter key to in
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!