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

  Why should you write and install the program

You worry that this system gives an unfair advantage to patients with last names that start with A, B, C, and D. Why should you write and install the program?

  Questionsstudy any two multicore processor architecture and

questionsstudy any two multicore processor architecture and discuss the following features briefly.a bus architectureb

  Review problem on penetration testing effort

Research the web and find an appropriate incident related to either a successful or failed penetration testing effort, or a successful or unsuccessful hacking.

  Discuss elgamal encrypted message

Assume Bob send an Elgamal encrypted message to Alice. Wrongly, bob uses the same parameter ifor all messages

  Examples of suitable values for each of subsequent type

Give examples of suitable values for each of the subsequent type expressions. Do not use the empty list as the value for any list component.

  Explain what the database roles

Describe steps necessary to setup SQL Server security.

  Describe an algorithm for finding the maxima pairs of c

Given a collection C of n cost-performance pairs (c,p), describe an algorithm for finding the maxima pairs of C in O(n logn) time.

  Create the closure plan

Create the report in 800 words in a Microsoft Word document; Cite any sources you use using correct APA format on a separate page

  Evaluate air properties at a given film temperature

A manufacturer makes absorber plates that are 1.2 m × 0.8 m in size for use in solar collectors. The back side of the plate is heavily insulated.

  Left most derivation

A->a|aS|bAA, B->b|bS|aBB, For the string “aaabbabbba” determine a Left most derivation.

  Define class automobile and use window as a member of class

define the class automobile and use window as a member of the class. Explain the proper use of inheritance in terms of the is-a relation.

  What would happen if you omitted the call to repaint

What would happen if you omitted the call to repaint in the append method of the Chart Component class?

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