It uses a one-dimensional array. You can ... It uses a one-dimensional array. You can refer to the PowerPoint slides, many of the tasks can be found there, but you need to apply them for this program. Note that the array will be filled with the integers when the user enters them. Consider the proper layout and correct indentation. Consider the following program that reads a number of nonnegative integers into an array and prints the contents of the array. You will add to the program. Complete the missing parts, add new function prototypes and function definitions, and test the program several times. Do not do it all at once. Add the following to the program: 1. Write a function to display some heading with useful information which will display on the screen for the user. 2. Write a void function that prints the list of nonnegative integers in reverse. 3. Write a void function that prints all the numbers stored in the list that are greater than 10. It will also print the number of such numbers found. 4. Write a function that determines the largest value stored in the array and returns that value to the calling function main. 5. Write a function that determines the number of even integers stored in the array and returns that value to the calling function main. 6. Write a function that calculates the average of the values stored in the array and returns that value. to the calling function main. 7. Write the function calls with the appropria arguments in the function main. Any value returned will be output. Privacy - Terms II

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
10:38 O
@ all ull 65%|
= bartleby
Q&A I O
Engineering / Computer Scie... / Q&A Library / It uses a on...
It uses a one-dimensional array. You can ...
It uses a one-dimensional array. You can refer to the
PowerPoint slides, many of the tasks can be found
there, but you need to apply them for this program.
Note that the array will be filled with the integers
when the user enters them. Consider the proper
layout and correct indentation.
Consider the following program that reads a number
of nonnegative integers into an array and prints the
contents of the array. You will add to the program.
Complete the missing parts, add new function
prototypes and function definitions, and test the
program several times. Do not do it all at once. Add
the following to the program:
1. Write a function to display some heading with
useful information which will display on the
screen for the user.
2. Write a void function that prints the list of
nonnegative integers in reverse.
3. Write a void function that prints all the numbers
stored in the list that are greater than 10. It will
also print the number of such numbers found.
4. Write a function that determines the largest
value stored in the array and returns that value
to the calling function main.
5. Write a function that determines the number of
even integers stored in the array and returns
that value to the calling function main.
6. Write a function that calculates the average of
the values stored in the array and returns that
value. to the calling function main.
7. Write the function calls with the appropria
arguments in the function main. Any value
returned will be output.
Privacy - Terms
II
Transcribed Image Text:10:38 O @ all ull 65%| = bartleby Q&A I O Engineering / Computer Scie... / Q&A Library / It uses a on... It uses a one-dimensional array. You can ... It uses a one-dimensional array. You can refer to the PowerPoint slides, many of the tasks can be found there, but you need to apply them for this program. Note that the array will be filled with the integers when the user enters them. Consider the proper layout and correct indentation. Consider the following program that reads a number of nonnegative integers into an array and prints the contents of the array. You will add to the program. Complete the missing parts, add new function prototypes and function definitions, and test the program several times. Do not do it all at once. Add the following to the program: 1. Write a function to display some heading with useful information which will display on the screen for the user. 2. Write a void function that prints the list of nonnegative integers in reverse. 3. Write a void function that prints all the numbers stored in the list that are greater than 10. It will also print the number of such numbers found. 4. Write a function that determines the largest value stored in the array and returns that value to the calling function main. 5. Write a function that determines the number of even integers stored in the array and returns that value to the calling function main. 6. Write a function that calculates the average of the values stored in the array and returns that value. to the calling function main. 7. Write the function calls with the appropria arguments in the function main. Any value returned will be output. Privacy - Terms II
10:39
O O ll 65%
= bartleby
Q&A
Engineering / Computer Scie... / Q&A Library / It uses a on...
It uses a one-dimensional array. You can ...
// Definition of function ReadList.
// This function reads nonnegative integers from the keyboard into an array.
// The parameter list is an array to hold nonnegative integers read.
// The parameter length is a reference parameter to an int. It holds the
// number of nonnegative integers read.
void ReadList ( int list[l, ints length)
int number;
int index - 0;
cout « "Enter nonnegative integers each separated by a blank space, \n"
and mark the end of the list with a negative number: ";
cin >> number;
//read the first integer entered
//check that the number is nonnegative and
// the size of the array is not exceeded
while (number >-0 s6 index < MAX_SIZE)
list[index)- number;
//store the integer in the array
// increment the index
// read the next integer
// length is the number of nonnegative integers
//
length - index;
in the list
//** *****
************************************
// Definition of function PrintList.
// The function prints the nonnegative integers in the array list and the
// number of integers in the array.
// The parameter list holds the nonnegative integers
// The parameter length holds the number of nonnegative integers.
//****
void PrintList (const int list [], int
int index;
cout <« "\nThe list contains
« length
« " nonnegative integer (s) as follows: \n";
To be completed
7/---
//
//add the block comment for the program
//
//--
#include <iostream> //for cin, cout
using namespace std;
const int MAX_SIZE = 20;
// maximum size of array
//function prototypes
void ReadList ( int [], ints);
void PrintList (const int[], int);
int main()
int list (MAX_SIZE];
int numberofIntegers;
// array of nonnegative integers
// number of nonnegative integers in array
Privacy - Terms
ReadList (list, numberofIntegers);
PrintList (
II
Transcribed Image Text:10:39 O O ll 65% = bartleby Q&A Engineering / Computer Scie... / Q&A Library / It uses a on... It uses a one-dimensional array. You can ... // Definition of function ReadList. // This function reads nonnegative integers from the keyboard into an array. // The parameter list is an array to hold nonnegative integers read. // The parameter length is a reference parameter to an int. It holds the // number of nonnegative integers read. void ReadList ( int list[l, ints length) int number; int index - 0; cout « "Enter nonnegative integers each separated by a blank space, \n" and mark the end of the list with a negative number: "; cin >> number; //read the first integer entered //check that the number is nonnegative and // the size of the array is not exceeded while (number >-0 s6 index < MAX_SIZE) list[index)- number; //store the integer in the array // increment the index // read the next integer // length is the number of nonnegative integers // length - index; in the list //** ***** ************************************ // Definition of function PrintList. // The function prints the nonnegative integers in the array list and the // number of integers in the array. // The parameter list holds the nonnegative integers // The parameter length holds the number of nonnegative integers. //**** void PrintList (const int list [], int int index; cout <« "\nThe list contains « length « " nonnegative integer (s) as follows: \n"; To be completed 7/--- // //add the block comment for the program // //-- #include <iostream> //for cin, cout using namespace std; const int MAX_SIZE = 20; // maximum size of array //function prototypes void ReadList ( int [], ints); void PrintList (const int[], int); int main() int list (MAX_SIZE]; int numberofIntegers; // array of nonnegative integers // number of nonnegative integers in array Privacy - Terms ReadList (list, numberofIntegers); PrintList ( II
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 4 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
  • SEE MORE 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