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
antoniya [11.8K]
3 years ago
7

An array, numbers, of integers is filled with 100 random numbers whose values are greater than 10 and less than 255. You DO NOT

have to write code to generate the random numbers. Write the code to count how many of the even numbers in the array are greater than 10 and less than 157 (inclusive).
Computers and Technology
1 answer:
Virty [35]3 years ago
4 0

Answer:

int counter = 0;

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

if(myarr[i]%2==0){

if(myarr[i] > 10 && myarr[i]<157){

counter++;

}

}

}

cout<<counter;

Explanation:

The question is answered using c++ and it assumes that the array name is myarr

This line initializes counter to 0

int counter = 0;

This iterates through the array

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

This checks if current array element is even number

if(myarr[i]%2==0){

If the above condition is true; This checks if the array element is within the range of 10 and 157 (inclusive)

if(myarr[i] >= 10 && myarr[i]=<157){

If yes, the counter is increased by 1

counter++;

}

}

}

This prints the total counter number

cout<<counter;

You might be interested in
Consider this binary search tree:______.
Nitella [24]

Answer:

The new root will be 2.

<em></em>

Explanation:

The binary tree is not properly presented (See attachment)

To answer this; first, we need to order the nodes of the tree in a pre-order traversal.

We use pre-order because the question says if something is removed from the left child.

So, the nodes in pre-order form is: 14, 2, 1, 5, 4, 16.

The root of the binary tree is 14 and if 14 is removed, the next is 2.

<em>Hence, the new root will be 2.</em>

7 0
2 years ago
FTP is commonly used to __________ and __________ files to a server.
Aleks [24]

Answer:

upload; download

Explanation:

FTP (File Transfer Protocol) is an internet protocol used to upload and download a file to a server, there are some programs help us to transfer this data to a server, in some cases, we're going to need these programs to upload website files to the server like images or videos, or some websites where do you need a user and passwords to upload file by FTP

8 0
3 years ago
Beneficios del reciclaje electrónico
kykrilka [37]

English:

Recycling, in general, is good, it saves space in landfills and prevents pollution. Because some of the materials used to make the electronic piece are made with toxic ingredients its better to recycle them instead of having them end up in our oceans. Also, some pieces of electronics contain valuable metals like gold and copper. These Metals can be reused to make new better electronics with having to use the energy and money to produce new materials  

Español:

El reciclaje, en general, es bueno, ahorra espacio en los vertederos y evita la contaminación. Debido a que algunos de los materiales utilizados para fabricar la pieza electrónica están hechos con ingredientes tóxicos, es mejor reciclarlos en lugar de que terminen en nuestros océanos. Además, algunos componentes electrónicos contienen metales valiosos como el oro y el cobre. Estos metales se pueden reutilizar para fabricar nuevos y mejores productos electrónicos con la necesidad de utilizar la energía y el dinero para producir nuevos materiales.

4 0
3 years ago
When would it be necessary to edit the information shown on an electronic business card?
Goryan [66]

Answer:

Really depends on your situation. If you specified, I'd have an asnwer

3 0
3 years ago
Read 2 more answers
I NEED HEP QUICK
avanturin [10]

Answer:

O = (C2+C3+C4+C5)-81

Explanation:

5 0
2 years ago
Other questions:
  • A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-lif
    10·1 answer
  • g Write a program to sort an array of 100,000 random elements using quicksort as follows: Sort the arrays using pivot as the mid
    7·1 answer
  • For electronically deposited funds, such as an employee's direct deposit, when must banks make those funds available to the empl
    8·1 answer
  • Is a component that provides a button control in a gui application or applet?
    15·1 answer
  • A typical self-expelling fire extinguisher empties its contents in
    8·1 answer
  • Jeremy wishes to create a site map for his website. What tag will surround the URL of his home page?
    9·1 answer
  • How to change color of object in photoshop?
    10·2 answers
  • A network administrator needs 10 prevent users from accessing the accounting department records. All users are connected to the
    10·2 answers
  • What are the functions of super computer?<br> ​
    7·2 answers
  • Identify three errors in this HTML code snippet:
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!