How many element in the array is above the average

Assignment Help Computer Engineering
Reference no: EM132101102

Exercise: Random Numbers

Write the void function generate(int N, in A[ ]) that generates and prints N numbers each between 12 and 83 inclusive.

Write the function average(int, int [ ]) that returns the average of the elements of an array.

Write the function frequency(int, int [ ], float, int &) that counts how many element in the array is above the average and how many element is below the average.

Write the function main( ) that reads N, calls the function generate( ), calls the function average( ), calls the function frequency( ), and prints the result, see sample input / output.

Sample input/output:

enter number of random number: 11

the 11 random number are: 76 82 55 53 40 69 58 55 57 30 76

the averag of the 11 random number is : 59.1818

there are 7 number below the average and 4 numbers above the average

Reference no: EM132101102

Questions Cloud

Food and beverages industry : Which of external factors (Legal and regulatory, Global, Economic, Techno-logical, Innovation, Social, Environmental, Competitive Analysis)
Competitive or the economic environment : What would be considered a threat from the competitive or the economic environment? What about an opportunity?
How much do you need to invest today : If you deposit money now, you can earn 7% per annum with a 50% probability, 6% with a 25% probability and 8% with a 25% probability.
Listed for management consideration : Since growth opportunities are another major concern, the average population growth rates has to be listed for management's consideration.
How many element in the array is above the average : Write the void function generate(int N, in A[ ]) that generates and prints N numbers each between 12 and 83 inclusive.
What does it mean to differentiate a service : What does it mean to differentiate a service? How can you use it to increase target market interest?
What is administrative law : What is administrative law? How does administrative law affect companies?
How heterotrimeric G proteins involved in decreasing cAMP : In detail, describe how heterotrimeric G proteins are involved in decreasing cAMP accumulation via a G protein-coupled receptor
Develop strategy to maintain nonunion environment : How would you develop a strategy to maintain a nonunion environment?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Define wlan

In WLAN data can be sent in one of the two different network modes. What are these modes?

  Write a complete little man program to input numbers

Write a complete little man program to input numbers until 0 is reached. for each imput number, if its greater than or equal to the number to the first number.

  Assume the network is a packet-switched datagram network

discuss sending a file of F bytes over a path of Q links. Each link transmits at R bps. The network is lightly loaded so that there are no queuing delays. Propagation delay on each link is Tp on average.

  What are the benefits of writing a change management policy

Why is an understanding of risk and risk management so important to an effective and successful information security program?

  Program to display a bouncing blue ball inside a jpanel

Write down a program to display a bouncing blue ball inside a JPanel. The ball should begin when the mouse is clicked inside the window. The ball will continue until the window is closed.

  Evaluate how information privacy and security relates to

evaluate how information privacy and security relates to the internet which is the major information conduit for

  Design a serial adder circuit to add two bcd digits

Design a serial adder circuit to add two BCD digits. Each digit is in a four-bit shift register. The sum should occupy a five bit shift register.

  Write a program to test various operations on a circle

Design a class, circleType, that can store the radius and center of the circle. Also, write a program to test various operations on a circle.

  Verilogprogram for a sticky-counter state machine

Write an ABEL, VHDL, or Verilogprogram for a sticky-counter state machine with eight states, S0 -S7,that are coded into three bits in binary counting order. Besides CLOCK, the machine should have two inputs, RESET and ENABLE, and one output, DONE...

  What is linear cryptoanalysis and how is it applied

What is linear cryptoanalysis and how is it applied to a problem in general (ie. Not mathematic formulas, but how you would apply approach to some new crypto).

  Calculate the steady rate of heat transfer

A 10-cm-diameter and 10-m-long cylinder with a surface temperature of 10°C is placed horizontally in air at 40°C.

  Assume that queue is a queue type object

assume that queue is a queue type object and the size of the array-implementing queue is 100. Also, suppose that the value of the queueFront is 25 and the value of queueRear is 25.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd