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
The clicking of a form is _________________________.
Montano1993 [528]

Answer: An event

Explanation:

 The clicking is the form of an event that basically occur when any type of elements are click.

The clicking is the function which is performed by the user in the computer system which basically activates the element so that it give some meaningful output for example keyboard and mouse.

Clocking is the event that basically attaches the function for running in the system when the click event are occurred.

Therefore, an event is the correct option.

6 0
3 years ago
One benefit for a small business using the hosted software model for its enterprise software is that it can succeed without ____
Simora [160]

Answer:

One benefit for a small business using the hosted software model for its enterprise software is that it can succeed without employing full-time IT professionals.

Explanation:

7 0
2 years ago
(tco 3) what vbscript boolean operator could be used to replace the nested selection structure in this pseudocode? if empmedical
Leto [7]
You want both conditions to be true, so you can "And" them.
In vbscript, the and is written as "And" (not as && like other languages), so you get:

<span>If (empmedicalins = "y") And (empdentalins = "y") Then
    print empidnumber, emplastname, empfirstname
Endif</span>
3 0
3 years ago
30 points!!! Which type of a network is the Internet?
Eva8 [605]

Answer:

Wide Area Network or Public WAN

Explanation:

8 0
4 years ago
Read 2 more answers
______-____ parameters provide a one-way link between actual parameters and formal parameters.
Oxana [17]

Answer:

Value

Explanation:

3 0
2 years ago
Other questions:
  • Write a program that takes nouns and forms their plurals on the basis of these rules:
    8·1 answer
  • What is print media?
    14·1 answer
  • What is an efficient way to ensure that the code is working as per the acceptance criteria/business requirements? (1 correct ans
    11·2 answers
  • You notice that it’s very easy to confuse medications at the community health center where you’re working. They are lined up on
    10·1 answer
  • What kind of software program delivers advertising content in a manner that is unexpected and unwanted by the user, and is typic
    14·1 answer
  • Find products that satisfy BOTH conditions below:______
    6·1 answer
  • To delete a row, you must first
    11·1 answer
  • Define the missing function. licenseNum is created as: (100000 * customID) licenseYear, where customID is a function parameter.
    12·1 answer
  • How do you change your grade level
    10·1 answer
  • Write a function named partfthat takes inas parameterstwo parallel lists: a list of times (in increasing order), and a list of d
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!