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
A company is developing a smart TV that connects to a wireless home network. Which technology can best help to establish this co
pantera1 [17]
C wifi A company is developing a smart TV that connects to a wireless home network. Which technology can best help to establish this connection?
Bluetooth
Infrared
C.
WI-FI
D
Internet of things
E
satellite
8 0
3 years ago
Read 2 more answers
design a relational database in EER for bike helmets and their reviews. a bike helmet has a name and color attributes. a bike co
Law Incorporation [45]

Answer:something you gotta do on your own

Explanation:

7 0
3 years ago
What property of semi-metals is useful in the computer industry?
artcher [175]
The answer is (a. Semi-conducting)
In the computer industry, semi-metals with a semiconducting property are useful in making of semiconductors. These metals have high resistance but lower than compare to insulators. This conductor could be crystalline or amorphous solids.
4 0
3 years ago
In this exercise, you will write a class that represents how you spend your time during the week The class should have four doub
Nuetrik [128]

Answer:

Answered below

Explanation:

# Program is written in Java

class WeekHours{

double school;

double fun;

double sleep;

double sports;

WeekHours( ){

school = 0.0;

fun = 0.0;

sleep = 0.0;

sports = 0.0;

}

public void setSchool ( double x){

school = x;

}

public void setFun( double y){

fun = y;

}

public void setSleep( double w){

sleep = w;

}

public void setSports( double z){

sports = z;

}

public void totalHours(){

double tHours = school + fun + sleep + sports;

System.out.print(tHours);

}

}

4 0
3 years ago
Using bearings will cause more friction. Group of answer choices True False
Olegator [25]

Answer:

False

Explanation:

6 0
3 years ago
Other questions:
  • Marisol manages the online advertising campaigns for a chain of toy stores with both a physical and an online presence. Which Go
    7·1 answer
  • You can access various sites on the WWW by using hyperlinks or by
    14·1 answer
  • Name the function in Python that prompts user to enter values as per the data type specified.
    5·1 answer
  • Information about hardware engineers?
    9·1 answer
  • Write a SELECT statement that returns three columns: VendorName from Vendors table, DefaultAccount No from Vendors table, Accoun
    10·2 answers
  • Hy plzz help me friends​
    5·2 answers
  • Write if true or false
    12·1 answer
  • Where can formatting features be found ?! Need help asp !‍♀️
    9·1 answer
  • After creating a webpage with html code, what do you need to do so that others can access it on the internet?.
    11·1 answer
  • Explain why you would use the soft on/off jumper when working on ATX system
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!