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
Romashka-Z-Leto [24]
3 years ago
6

For any element in keysList with a value smaller than 40, print the corresponding value in itemsList, followed by a space.

Computers and Technology
1 answer:
lidiya [134]3 years ago
3 0

Answer:

  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.    const int SIZE_LIST = 4;
  6.    int keysList[SIZE_LIST];
  7.    int itemsList[SIZE_LIST];
  8.    int i;
  9.    keysList[0] = 13;
  10.    keysList[1] = 47;
  11.    keysList[2] = 71;
  12.    keysList[3] = 59;
  13.    itemsList[0] = 12;
  14.    itemsList[1] = 36;
  15.    itemsList[2] = 72;
  16.    itemsList[3] = 54;
  17.    
  18.    for(i=0; i < SIZE_LIST; i++){
  19.        
  20.        if(keysList[i] < 40){
  21.            cout<<itemsList[i]<< " ";    
  22.        }
  23.    }
  24.    return 0;
  25. }

Explanation:

In the given code we have two parallel arrays with predefined values (Line 11 - 18). To check if any value from keysList below 40, create a for loop to traverse through the array and in the loop create an if statement to check the each of the keysList value (Line 20 - 22). If any value from keysList is below 40, use the current i value as an index to get the corresponding value from itemsList (Line 23) and print it out along with a single space " ".

You might be interested in
Physical security controls traditionally include obstacles, alarms, lights, guards, cameras, and responders that produce a(n) __
Lostsunrise [7]

Answer:

secure facility

Explanation:

7 0
3 years ago
Complete the sentence.
julsineya [31]

Answer:

An internal server error

5 0
3 years ago
What is the binary conversion of 179.187.223.21?
Lemur [1.5K]

Explanation:

I hope its the correct answer i'm not sure!

6 0
3 years ago
Read 2 more answers
Brief deacription of how hard drives have evolved
Zepler [3.9K]

Answer:

The first HDD was created by IBM in 1956 and was the size of a refrigerator. The total storage capacity was 5 MB and only two heads were used to read the disks. The 1970s offered a hard disk drive in much smaller shells with the ability to store roughly 60 MB.

Please Mark Brainliest If This Helped!

4 0
3 years ago
A CPU's processing power is determined by the combination of the clock speed, the number of cores, and the amount of ________ me
kodGreya [7K]

Answer:

A CPU's processing power is determined by the combination of the clock speed, the number of cores, and the amount of _random access _______ memory.

7 0
3 years ago
Other questions:
  • Suppose that some company has just sent your company a huge list of customers. You respond to that company with a strongly worde
    15·1 answer
  • Refer to the exhibit. A network administrator configures a named ACL on the router. Why is there no output displayed when the sh
    7·1 answer
  • Create a cell reference in a formula by typing in the cell name or
    7·2 answers
  • Which type of address defines a single network interface in a computer or other device?
    7·1 answer
  • Two positive outcomes generally associated with modern computing are greater _____.
    12·2 answers
  • This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defined by
    8·1 answer
  • What is sfa software?
    10·1 answer
  • You suspect that an attacker has hidden files on your machine. What Linux command would you use to search for files with a file
    14·1 answer
  • Which cable would you check if you can't access any web pages?
    12·1 answer
  • What is the purpose of the Zoom dialog box? to put the selected range in ascending order in a query to put the selected range in
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!