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
natali 33 [55]
3 years ago
7

Multiple arrays. Jump to level 1 For any element in keysList with a value greater than 40, print the corresponding value in item

sList, followed by a space. Ex: If keysList = {32, 105, 101, 35} and itemsList = {10, 20, 30, 40}, print: 20 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 #include #include using namespace std; int main() { const int SIZE_LIST = 4; int keysList[SIZE_LIST]; int itemsList[SIZE_LIST]; int i; cin >> keysList[0]; cin >> keysList[1]; cin >> keysList[2]; cin >> keysList[3]; cin >> itemsList[0]; cin >> itemsList[1]; cin >> itemsList[2]; cin >> itemsList[3]; /* Your code goes here */ cout << endl; return 0; } 1 2 Check Next
Computers and Technology
2 answers:
Doss [256]3 years ago
8 0

Answer:

Replace/* Your code goes here */ with

for(int count = 0; count<4; count++)

{

if(keysList[count] > 40)

{

cout<<itemsList[count]<<" ";

}

}

Explanation;

The solution provides used an iteration to loop from the first toll the last.

The index of an array starts at 0

The index of the last element is calculated as total element - 1

Since the count of the array is 4, the last index is 4 - 1 = 3.

In the solution provides, a count integer variable is declared to iterate through the keysList array

Each element of keysList array is tested to know if it's greater than 40.

If yes the corresponding element in itemsList is printed followed by a space

Else

Nothing is done

The codes segment goes thus

for(int count = 0; count<4; count++)

{

if(keysList[count] > 40)

{

cout<<itemsList[count]<<" ";

}

}

Nesterboy [21]3 years ago
5 0

Answer:

See explaination for the details of the code.

Explanation:

import java.util.Scanner;

public class ArraysKeyValue {

public static void main (String [] args) {

final int SIZE_LIST = 4;

int[] keysList = new int[SIZE_LIST];

int[] itemsList = new int[SIZE_LIST];

int i;

keysList[0] = 13;

keysList[1] = 47;

keysList[2] = 71;

keysList[3] = 59;

itemsList[0] = 12;

itemsList[1] = 36;

itemsList[2] = 72;

itemsList[3] = 54;

for(i = 0;i < SIZE_LIST;i++){

if(keysList[i] < 50){

System.out.print(itemsList[i]+" ");

}

}

System.out.println("");

}

}

You might be interested in
assume that youre creating a website for a school. you want to insert pictures of students and teachers. which tag will you use
sammy [17]

<u>Tag to insert pictures of students and teachers:</u>

While creating a website for a school, the developer would like to make it more attractive and appealing by adding hyperlinks, images, and videos.

In order to insert pictures of students and teachers, the developer will have to use the <img> tag. The <img> tag allows a user to an image to a webpage.

An example of inserting an image in a webpage is as follows:

<img src=""Annual.gif"" alt=""Annual Day"" height=""40"" width=""40"">

<img src=""Independence.gif"" alt=""Independence Day"" height=""40"" width=""40"">"

5 0
3 years ago
Read 2 more answers
What is desktop computer? <br> ​
butalik [34]

Answer:

a computer suitable for use at an ordinary desk.

noun: desktop computer

"a new low-end desktop"

Explanation:

please mark me as a brainly

3 0
2 years ago
Read 3 more answers
true or false then EXPLAIN why. Since many forms of money do not earn interest, people's demand for money is unaffected by chang
katrin [286]

Answer:

False

Explanation:

It is true that many forms of money do not earn interest. However, it is not true that this means that people's demand for money is unaffected by changes in interest rates. One of the ways interest rates can change the demand for money is because this can influence the way people divide their money. When a person has money, he can decide whether to keep this in teh form of money, or whether to keep wealth through another asset. When interest rates decrease, people are more likely to keep money in the form of money, as opposed to other assets. This is the source of the demand for money.

3 0
3 years ago
Read 2 more answers
Adding Objects in Outlook
skelet666 [1.2K]

Answer:

I know its kinda late, but the answer is (B. Insert) on edg 2021.

Explanation:

5 0
3 years ago
As the demand for goods and services increases job growth
maria [59]
<span>As the demand for goods and services increases job growth... </span>Increases as well.
7 0
3 years ago
Other questions:
  • What software that allow for one-click performance profiles for msi video card??
    5·1 answer
  • If you were going to construct a table that only included shape names with number prefixes, which shape would you include
    11·1 answer
  • What makes iron man different from other superheroes ? why is iron man the best superhero ??
    5·2 answers
  • Suppose that your application uses a loop that isn't producing the intended results. The best way to analyze what’s going on in
    13·1 answer
  • To filter a list with the Filter function, on an Excel spreadsheet, you need to perform the following steps: (1) click in any ce
    9·1 answer
  • This problem has been solved!
    8·1 answer
  • Return true if the given non-negative number is a multiple of 3 or 5, but not both. Use the % "mod" operator.
    12·1 answer
  • W t f is a ground fault circuit interrupter?
    6·2 answers
  • Describe PROM, EPROM and EEPROM memories​
    7·1 answer
  • Your enterprise LAN uses a VPN so that users working from home can access shared Windows folders in the office, but it doesn't w
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!