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

  Prepare an arbitrary sinusoidal waveform

Create a program to compute the derivative of an arbitrary input function, with arbitrary duration and arbitrary limits

  Develop a simple poker game

Develop a simple poker game

  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..

  Program to print out invalid number to character

The integer must contain 3 distinct non-zero number, or the program will print out invalid number.it should print out invalid query.

  Time conversion

Write a C++ program that takes an Eastern standard time in hours, minutes, and seconds,and prints it out in Central time, Mountain time, or Pacific time.

  A hierarchical jpeg encode decoder for greyscale images

This project is to develop a program that implements a hierarchical JPEG encoder/decoder for greyscale images.

  Program to store lists of names and ages in parallel arrays

Write a C++ program that stores lists of names (the last name first) and ages in parallel arrays and sorts the names into alphabetical order keeping the ages with the correct names.

  Write a c program that reads a data file of floating numbers

Write a program that reads a data file of floating numbers into an array and prints the array elements along with the number of items in the array

  Create a base employee class

Create a base Employee class and a derived StudentEmployee class

  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.

  Implementation of sorting technique

Implementation of sorting technique

  Program which asks the user for due date of next assignment

Write a program which asks the user for due date of the next assignment (hours, minutes). Then print number of minutes between the current time and the due date in format.

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