Write three functions for: mean, remove, display //include any standard libraries needed // - passes in an array along with the size of the array // - returns the mean of all values stored in the array  double mean( const double array [ ], int arraySize); // - Passes in an array, the size of the array by reference, and the index of a value to be removed from the array. // - Removes the value at this index by shifting all of the values after this value up, keeping the same relative order of all values not removed. // - Refuces arraySize by 1. void remove (double array[], not &arraySize, int index); // - Passes in an array and the size of the array. // - outputs each value in the array separated by a comma and space, with mo comma, space or beeline at the end. void display (const double array[], int arraySize); const int ARR_CAP = 100; int main (int argc, char *argv[]){ // verify file name provided on command line // open file and verify it opened // declare an array of doubles of size ARR_CAP.  // fill the array with up to ARR_CAP doubles from the file entered at the command line // call the mean function passing it this array and output the value returned. //ask the user for the index ( 0 to size - 1) of the value they want to remove // call display function to output the array // call remove function to remove the value at the index provided by the user  // call display function again to output the array with the value removed.  // call mean function again to get the new mean

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Write three functions for: mean, remove, display

//include any standard libraries needed

// - passes in an array along with the size of the array

// - returns the mean of all values stored in the array 

double mean( const double array [ ], int arraySize);

// - Passes in an array, the size of the array by reference, and the index of a value to be removed from the array.

// - Removes the value at this index by shifting all of the values after this value up, keeping the same relative order of all values not removed.

// - Refuces arraySize by 1.

void remove (double array[], not &arraySize, int index);

// - Passes in an array and the size of the array.

// - outputs each value in the array separated by a comma and space, with mo comma, space or beeline at the end.

void display (const double array[], int arraySize);

const int ARR_CAP = 100;

int main (int argc, char *argv[]){
// verify file name provided on command line

// open file and verify it opened

// declare an array of doubles of size ARR_CAP. 

// fill the array with up to ARR_CAP doubles from the file entered at the command line

// call the mean function passing it this array and output the value returned.

//ask the user for the index ( 0 to size - 1) of the value they want to remove

// call display function to output the array

// call remove function to remove the value at the index provided by the user 

// call display function again to output the array with the value removed. 
// call mean function again to get the new mean

 

 

Expert Solution
Overview

In this question we have to write a code for three functions: mean, remove, display

Let's understand and code with the given description. Hope this helps you if you have any queries utilities threaded questions feature.

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education