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
Determine which program you would recommend each of the customers should use. There are multiple correct answers so please inclu
Lana71 [14]
  1. Since Adult A has been asked to create a website for their church, the most appropriate software to use is Sublime Text because it can be used to type all of the instructions to be executed.
  2. Adult B should use Adobe Photoshop to create a flyer about an upcoming social gathering for her workplace.

<h3>What is a text editor? </h3>

In Computer technology, a text editor can be defined as a tool which is typically designed and developed to enable a software or web developer in typing and create the instructions to be used in a software or website such as a blog.

Sublime Text is a very good example of a text editor and should be used by Adult A to create a website for his or her church because it can be used to type all of the instructions that need to be executed and provides indentation by default.

On the other hand (conversely), Adult B should use Adobe Photoshop to create a flyer about an upcoming social gathering for her workplace because it is arguably the best graphics design software.

Read more on text editor here: brainly.com/question/4004088

#SPJ1

5 0
2 years ago
Which procedure is recommended when cleaning inside a computer? Clean the hard drive heads with a cotton swab. Hold the CPU fan
ddd [48]

Answer:

Hold the CPU fan so that it won't spin and blow this with compressed air.

Explanation:

While cleaning the computer system from the inner side then we have to follow some steps.

  • Firstly, shut down the system properly and remove it from the power supply.
  • Then, open the cabinet of the computer system.
  • Then, clean the internal parts of the system through simple air pressure and hold the CPU fan during that time to avoid spinning.
  • Clear the dirt layer using the can of compressed air over the cabinet fans.
8 0
3 years ago
Omar wants to know how his organization has been doing financially over the last year. He wants to also compare this information
IRINA_888 [86]

C is the right answer for apex

8 0
3 years ago
Read 2 more answers
2
Elza [17]

A is the correct answer.

Hope this helps you!

3 0
3 years ago
Read 2 more answers
A.<br>Define a computer with its proper meaning.​
Rashid [163]

Answer:

Computer

Explanation:

a programmable electronic device designed to accept data, perform prescribed mathematical and logical operations at high speed, and display the results of these operations.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Ports on the motherboard can be disabled or enabled in ____ setup. RAM Firmware Northbridge BIOS
    8·1 answer
  • Which device or software application detects errors in system configurations?
    8·1 answer
  • Fill in the blank
    13·2 answers
  • You asked your colleague to provide feedback on a blog post you recently wrote. When they sent you their feedback, they made edi
    10·1 answer
  • Write an if/else statement that compares the double variable pH with 7.0 and makes the following assignments to the bool variabl
    6·1 answer
  • Which descriptions offer examples of Correction Services workers? Select all that apply.
    8·1 answer
  • What is the largest possible value that the variable x can have after the code segment executes? 17 17 A 14 14 B 11 11 C 4
    8·1 answer
  • Brian gathers data from his classmates about the computers they own such as the type of operating system, the amount of memory,
    11·1 answer
  • What are basic types of touch screen
    15·2 answers
  • 90 POINTS Hazel is working with a database to help determine if the company she works for is making or losing money. Hazel has o
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!