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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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