Write program function prompt user for number of elements

Assignment Help C/C++ Programming
Reference no: EM1361222

Write a C++ program main function which will prompt the user for the number of elements called N desired for an array which has the capacity to store 50 elements and performs the following:

1. calls a void function, createArray which creates an array of N random numbers from 1 to 100 using the system functions srand() and rand() and returns the newly created array.

2. calls a void function, printArray which prints an array of N numbers.

3. calls a value-returning function, avgArray which finds the average of an array of N numbers.

4. calls a value-returning function, greaterElements which finds the percentage of array elements greater than the average of the array

5. calls a value-returning function, lesserElements which finds the percentage of array elements less than the average of the array

The main function will print the result of the percentages. All output should be labeled. Your program should (better) contain comments as appropriate for each call/function.

Reference no: EM1361222

Questions Cloud

How many electrons does the lightning bolt transfer : A 12 kg runaway grocery cart runs into a spring with spring constant 300 N/m and compresses it by 70 cm.What was the speed of the cart just before it hit spring.
Necessary micronutrients daily : What are some different ways I can make sure that I get all of the necessary micronutrients daily?
Write program to compute amount of money : Write a program that computes the amount of money the computer club will receive from the proceeds of their candy sales project.
What will be the resulting speed of the boat : What will be the resulting speed of the boat. A 74 kg fireman slides down a 4-m pole by applying a frictional force of 384 N against the pole with his hands. If he slides from rest, how fast is he moving once he reaches ground.
Write program function prompt user for number of elements : Write a C++ program main function which will prompt the user for the number of elements called N desired for an array which has the capacity to store 50 elements.
Ecological and economic perspective : What impact does two (2) of your meals have on our world from an ecological and economic perspective. You can pick breakfast, lunch or dinner.
Show the equilibrium effects on consumption and hours worked : Show the equilibrium effects on consumption and hours worked of and increase in G of this type are ambiguous but that output increases.
What ambiguity exists in the statement : Suppose f is a function that returns the result of reversing the string of symbols given as its input, and g. What ambiguity exists in the statement x?
Find how many revolutions : A magnetic computer disk 8 cm in diameter is initially at rest. A small dot is painted on the edge of the disk. A small dot is painted on the edge of the disk. The disk accelerates at 600 rad/s^2 for 1/2 s , then coasts at a steady angular velocit..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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