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

  Convert celsius temperatures to fahrenheit temperatures

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

  Project

Unit 3 Individual Project SSCI210 – 1304B – 01 A typical individual who commits who commits hate crimes whether it is against or aimed at the Gay/lesbian community , the persons of color or the Jewish community, ( I mention these three because they a..

  Prepare a linear support vector machine svm

Write a computer program to prepare a Linear Support Vector Machine SVM

  A constructor and a destructor

A constructor and a destructor, Insert a new element chosen by the user at the correct place in the list

  Implementation of sorting technique

Implementation of sorting technique

  Implementation of classes

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

  Prepare a program that uses at least two functions

Prepare a program that uses at least two functions that can be called from your main.

  Implement the delivery company

Implement the delivery company using the classes given in the class diagram above.

  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.

  Create a program that maintains the required book catalog

Create a program that maintains the required book catalog for the circulation desk of a library.

  Using opengl to create a cube

Write a program in C/C++ using OpenGL to create (without using built in function) a cube by implementing translation algorithm by translating along 1. X-axis, 2.Y-axis and 3. X and Y plane

  Function declare that it can throw an ioexception

Every C++ function that performs file I/O will thus need to either declare that it can throw an IOException, or contain a try-catch-finally block to deal with it. Response?

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