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
Edward has started up a new company with his friend, Matthew. Currently, he has only two people working with him. Which type of
Kruka [31]

A Peer-to-peer network architecture would work best for Edward and Matthew.

Although they have the option of creating a Client-Server type of network architecture, the number of people that they are currently working with would cost them a lot more than a peer-to-peer architecture.

One of the advantages of using a Peer-to-peer network architecture for a small network would be the access of files between all computers in the network. Even if one of the computers will fail, the other computers will still have access to the different files and information they will need to keep the company moving forward.

6 0
3 years ago
An engineer has reported that a printer is no longer working and needs troubleshooting. You have been informed that there is a p
gavmur [86]

Answer:

3D Printer.

extruders are in 3D printers.

7 0
2 years ago
Meats ages hair and feathers all contain this monomer
OverLord2011 [107]

Answer:Amino Acid

Explanation:

All proteins have amino acids

7 0
3 years ago
Which of the following is an example of constructive criticism for a friend who speaks too softly?
Dmitry [639]
C is correct..

Please vote my answer branliest! Thanks.
8 0
3 years ago
Read 2 more answers
What internet access technology currently uses a technology called 4G?
Leya [2.2K]
Phone wireless data plans.
8 0
3 years ago
Other questions:
  • What uses HTML hypertext links that users can click to access different locations or information?
    11·1 answer
  • Who are the founders of Microsoft?
    5·1 answer
  • Which software application offers a variety of templates for creating reports, flyers, and newsletters that you can access withi
    7·1 answer
  • When a Python program is reading a file, the data is input as plain ASCII characters in a string. What is the following code doi
    15·1 answer
  • Briefly explain what are JavaScript librairies​
    12·1 answer
  • In the cis configuration, the methyl groups are placed _____.
    8·2 answers
  • 3.26 LAB: Leap Year A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate a
    15·2 answers
  • MORE FREEE POINTS AYEEE
    7·2 answers
  • Write the function powersOf3ToN(n) that takes a possibly-negative float or int n, and returns a list of the positive powers of 3
    10·1 answer
  • Use the drop-down menus to answer the questions.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!