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
sdas [7]
3 years ago
9

Write the C++ code (NOT a full program) that prompts the user to enter 50 numbers and fills the array guestCount with these 50 n

umbers, so that the first number input is in the first element of the array, the second input in the second element, etc.
Computers and Technology
1 answer:
inna [77]3 years ago
3 0

Answer:

The code is as follows:

int guestCount[50];

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

       cout<<"guestCount "<<i+1<<": ";

       cin>>guestCount[i];

   }

Explanation:

This declares the array

int guestCount[50];

This iterates through the array (50 elements)

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

This prompts the user for each array element

       cout<<"guestCount "<<i+1<<": ";

This gets the input from the user

       cin>>guestCount[i];

   }

You might be interested in
2- There are many different design parameters that are important to a cache’s overall performance. Below are listed parameters f
katen-ka-za [31]

Answer:

1. 2588672 bits

2. 4308992 bits

3. The larger the data size of the cache, the larger the area of ​​memory you will need to "search" making the access time and performance slower than the a cache with a smaller data size.

Explanation:

1. Number of bits in the first cache

Using the formula: (2^index bits) * (valid bits + tag bits + (data bits * 2^offset bits))

total bits = 2^15 (1+14+(32*2^1)) = 2588672 bits

2. Number of bits in the Cache with 16 word blocks

Using the formula: (2^index bits) * (valid bits + tag bits + (data bits * 2^offset bits))

total bits = 2^13(1 +13+(32*2^4)) = 4308992 bits

3. Caches are used to help achieve good performance with slow main memories. However, due to architectural limitations of cache, larger data size of cache are not as effective than the smaller data size. A larger cache will have a lower miss rate and a higher delay. The larger the data size of the cache, the larger the area of ​​memory you will need to "search" making the access time and performance slower than the a cache with a smaller data size.

5 0
3 years ago
When creating an electronic slide presentation, Lee should avoid
Amanda [17]

I believe the answer is <u>Using sound effects between slides.</u>

Using sound effects between slides can cause for a distraction, and if you are in college, your professor may not score your presentation as well as if it were made without sound effects. Hope this helps!

5 0
3 years ago
Which statement is false? arrays may contain pointers. each entry in an array of strings is actually a pointer to the first char
konstantin123 [22]
<span>each entry in an array of strings is actually a pointer to the first character of a string

Each indice in an array of strings (which are actually each actually an array of char) is actually a pointer to the first (0th) char of a string.
</span>
4 0
3 years ago
The information computers give to users or other computers are called
AfilCa [17]

Answer:

the output processed data

7 0
2 years ago
Which of the following is true of binary files?
alina1380 [7]
Try using socrative to answer your question it’s really good
3 0
3 years ago
Read 2 more answers
Other questions:
  • When setting quotas for disk space, what are the two tools for enabling and configuring quotas? and which of the two are the mor
    8·1 answer
  • I need to create a function that returns Pascal's Triangle with n rows, where n is an int argument.
    12·1 answer
  • This common technique, employed at the edge of a network, eliminates the need for public IP addresses on a private network while
    8·1 answer
  • 3. The invention of the transistor was important to the development of computers because it
    5·1 answer
  • 1. Actuators apply mechanical force in the form of pressure to overcome
    10·1 answer
  • In the following code, use a lock to protect any data that might need protecting. Keep your critical sections as small as possib
    8·1 answer
  • HOW DO YOU RUN YOUR SCRATCH PROGRAM?
    12·2 answers
  • Where do charts get the data series names?
    14·1 answer
  • Al encender manda un mensaje de que Windows se cerró de manera inesperada y da varías opciones pero se elige la que sea, regresa
    12·1 answer
  • How ict tools changed the way we live explain it​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!