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
Kylee needs to ensure that if a particular client sends her an email while she is on vacation, the email is forwarded to a cowor
STALIN [3.7K]

Answer: Configure a response for external senders.

Explanation:

Since Kylee wants to ensure that when a particular client sends her an email while she is on vacation, then the email will be forwarded to a coworker for immediate handling, then she should configure a response for external senders.

It should be noted that the response will not be configured for internal senders as it isn't from a co-worker but rather meant for a client. Therefore, the correct option is A.

6 0
2 years ago
Why did latex replace wax?
andrezito [222]

Answer:

Latex replaced wax because it did the same thing and was used for the same things that wax would be used for

Explanation:

3 0
3 years ago
because of online writing, our audience: A. Compromise older people B. are bigger than before C. usually read less often D. are
lions [1.4K]
B. Are Bigger Than Before
8 0
3 years ago
Read 2 more answers
Which of the following is true of functions?
Anna11 [10]

Answer:

the answer is D

Explanation:

4 0
3 years ago
What is the ghosted text or picture behind the content on the page?​
Svetach [21]

Answer:

Watermark

Explanation:

This is actually called a Watermark. It is usually used as a way of showing the name or logo of the author who owns the content that is underneath the watermark. This is done so that individuals cannot steal the owner's work and use it as their own. Usually, the owner has the original version of the content without any watermark, as well as individuals that have purchased the content or a licence to use the content for personal or commercial usage.

3 0
2 years ago
Other questions:
  • Which of the following is NOT a group on the Slide Master tab?
    6·1 answer
  • TIFF is the default file format for most digital cameras. State True or False.
    13·1 answer
  • Can you use public domain images without violating copyright laws?
    5·1 answer
  • Hard light is usually not good for filming. True False
    11·2 answers
  • Why is a high-quality bond typically considered a lower-risk investment than a stock
    10·2 answers
  • What do level meters show?
    8·1 answer
  • What’s an example of software?
    6·2 answers
  • When writing research questions, use action words, such as
    6·2 answers
  • How do you give people a brianly i am knew as u can tell
    6·2 answers
  • A leading global vendor Of computer software hardware for computer mobile and gaming systems and cloud services it's corporate h
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!