Create an array of N integers.  Ask from the user how many elements he/she wants to input in the array.      Determine the following: (you may define a function for each item below) sum of all numbers INPUTTED the average of all numbers, count how many are EVEN numbers(excluding zero), how many are odd numbers and how many zeroes were inputted?         At the end, print the accumulated and counted values (for items a-e given above)  In the array.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section: Chapter Questions
Problem 6PP: (Numerical) a. Define an array with a maximum of 20 integer values, and fill the array with numbers...
icon
Related questions
Question

    Create an array of N integers.  Ask from the user how many

elements he/she wants to input in the array.

     Determine the following: (you may define a function for each item below)

  1. sum of all numbers INPUTTED
  2. the average of all numbers,
  3. count how many are EVEN numbers(excluding zero),
  4. how many are odd numbers
  5. and how many zeroes were inputted?

        At the end, print the accumulated and counted values (for items a-e given above)

 In the array.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT