before the prototypes, declare a variable const int SIZE { 6}; In main(), call WriteHeader(); Declare an array of 6 integers named numbers. Declare variables for sum and average. Open a do-while or while loop Ask the user to input 6 ints using the function void AskForInts(int nums[]); Call the function void CalcSumAndAve(int nums[],int &sum, double &ave); to calculate the sum and average. Of the 6 numbers in the array. Then display numbers, sum and average by calling the function void DisplayAll(int nums [], int sum, double ave);
before the prototypes, declare a variable const int SIZE { 6}; In main(), call WriteHeader(); Declare an array of 6 integers named numbers. Declare variables for sum and average. Open a do-while or while loop Ask the user to input 6 ints using the function void AskForInts(int nums[]); Call the function void CalcSumAndAve(int nums[],int &sum, double &ave); to calculate the sum and average. Of the 6 numbers in the array. Then display numbers, sum and average by calling the function void DisplayAll(int nums [], int sum, double ave);
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 8RQ
Related questions
Question
before the prototypes, declare a variable const int SIZE { 6};
In main(), call WriteHeader();
Declare an array of 6 integers named numbers.
Declare variables for sum and average.
Open a do-while or while loop
Ask the user to input 6 ints using the function
void AskForInts(int nums[]);
Call the function
void CalcSumAndAve(int nums[],int &sum, double &ave);
to calculate the sum and average. Of the 6 numbers in the array.
Then display numbers, sum and average by calling the function
void DisplayAll(int nums [], int sum, double ave);
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
Unlock instant AI solutions
Tap the button
to generate a solution
Knowledge Booster
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.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,