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
N76 [4]
2 years ago
6

Write a loop that fills an array int values[10] with ten random numbers between 1 and 100. Write code for two nested loops that

fill values with ten different random numbers between 1 and 100.
Computers and Technology
1 answer:
zalisa [80]2 years ago
7 0

Answer:

#include <iostream>

#include <cstdlib>

using namespace std;

int main() {

   int[] array = new int[10];

   int index = 0;

   while(index < array.size()){

           int number = (rand() % 100) + 1;

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

               array[index] = number;

               cout<< "Position "<< index << "of the array = "<< number << endl;

               ++index;

           }

     }

}

Explanation:

The while loop in the source code loops over a set of code ten times, The for loop only loops once to add the generated random number between 1 and 100 to the array of size 10. At the end of the for loop, the index location and the item of the array is printed out on the screen. The random number is generated from the 'rand()' function of the C++ standard library.

You might be interested in
Billy used to take care of his laptop. However, one day he lost his laptop. He lost all his data, and there was no way to retrie
Bad White [126]

Answer: D. He did not create a back up of his data.

Explanation: He lost his data, so he did not back it up in case he lost his laptop.

6 0
3 years ago
Regarding the Internet of Things (IoT), a business involved in utilities, critical infrastructure, or environmental services can
love history [14]

Answer:

The answer is False

Explanation:

IOT or Internet of things refers to the multiple devices in the world today, which are connected to the internet, they gather and share specific information. Any physical object can become an IOT device once it can be connected to the internet to control its data.

Since, the business is involved in utilities, critical infrastructure, or environmental services, it will not benefit from traffic-monitoring applications.

7 0
3 years ago
Which skill type refers to the knowledge and ability to perform a task?
Thepotemich [5.8K]

Sound, Audio for engineering sound Quality's.

7 0
2 years ago
Read 2 more answers
What happens when you press the Enter key at the end of a line of bulleted text?
sladkih [1.3K]

i think the  answer is d

6 0
3 years ago
Read 2 more answers
your manager asks you to set up a secure network connection at a remote site to move over some backups which protocol would you
nlexa [21]

The protocol that should be used for establishing a secure network connection is SSH.  

The following information is to be considered:  

  • SFTP is secure also it is a protocol for file transferring that applied SSH.
  • IP, FTP, and DHCP should not be for safety purposes as they are not secure.
  • SSH is a secured connection for the remote sites so here the SSH protocol should be used.

Therefore we can conclude that The protocol that should be used for establishing a secure network connection is SSH.

4 0
1 year ago
Other questions:
  • Jill is setting up a presentation and wants to use a built-in equation, such as the area of a triangle. To insert this in her pr
    14·2 answers
  • An array of integers named parkingTickets has been declared and initialized to the number of parking tickets given out by the ci
    14·1 answer
  • Whats the answer to this question?
    7·1 answer
  • How are switches indirectly involved in ARP poisoning?
    6·1 answer
  • Gabriel's sister called him about a message that suddenly appeared on her screen that says her software license has expired and
    11·1 answer
  • Code: ckg-jbqp-hki<br>only girls join❤️​
    11·2 answers
  • The address for the website you want to visit is called the browser internet URL World Wide Web
    5·2 answers
  • Which protocol is well known for its use in the the home security and home automation industry, uses a mesh topology, makes devi
    7·1 answer
  • You hide three worksheets in a workbook and need to unhide them. How can you accomplish this?.
    11·1 answer
  • Which of the following could be part of an algorithm?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!