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]
4 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]4 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]4 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
Sending an email to customer support before looking through the site and reading the frequently asked questions is an example of
IRINA_888 [86]

The correct answer is B. Doing your research

Explanation:

Before asking questions in a website or writing through customer support it is recommended to first do your research, this means looking for information on the internet or the frequently asked questions because in most cases the question you have in mind has been answered by the webpage or other people and therefore if you look by you own you can avoid sending emails or contacting people. This principle is basic when using the internet and implies only in case you cannot find the answer to a question you ask for help.

According to this, sending an email before looking through the site and reading the frequently asked question is an example of not doing your research, because it is supposed first you look for information on your own and just in case you cannot find anything you contact someone else.

3 0
3 years ago
You are on vacation and want to see where all the restaurants and trendy shops are in relation to your hotel. You remember there
klasskru [66]

Answer:

The right answer is GPS.

Explanation:

According to the scenario, the most appropriate answer is GPS service because nowadays there are many application i.e google maps,etc. which uses the location service and on the basis of the user's GPS coordinates gives the appropriate results.

GPS stands for the term global positioning system which is used to determine the geolocation of any person on earth by using navigation satellites.

4 0
4 years ago
Ally is taking a photograph of her friend. What is the orientation of her phone's screen?
In-s [12.5K]

Answer:

portrait

Explanation:

?

8 0
3 years ago
Microsoft words spell checker
Virty [35]
To check spelling<span> in a </span>Word<span> document, open up the document, head to the “Review” tab, then click on “</span>Spelling<span> & Grammar” (part of the “Proofing” group of tools). 

</span>
4 0
3 years ago
) A byte is used to represent a single character in the computer ______<br> true or false?
sdas [7]
Answer: false
Explanation:
7 0
3 years ago
Read 2 more answers
Other questions:
  • Which of these can be considered data?
    14·2 answers
  • Say our confusion matrix is as follows, calculate precision, recall, and accuracy. Interpret the results for the positive class.
    10·1 answer
  • Traditional methods of business communication tend to mean paper-based messages such as formal letters, brochures, reports, prop
    10·1 answer
  • In a CSS document, within what must you enclose properties and values when you define a rule for a specified selector?
    13·1 answer
  • Problems of mobile phones
    8·1 answer
  • You don't have policies that force settings for the look of users' computer desktops. Each user's chosen desktop settings are ap
    15·2 answers
  • 1. Before operating any power tool, you need to
    14·1 answer
  • For as long as you can remember, you've never been able to get a taco on Tuesday at your local taco truck. The lines are always
    8·1 answer
  • Who is responsible for developing the physical background for the characters by creating buildings, landscapes, and interiors?
    14·1 answer
  • Which of these is a discipline?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!