Question: I need help in C++ assignment. please add statements for each line of codes Requested files : CountDecades.cpp (Download) Maximum upload file size : 96

I need help in C++ assignment. please add statements for each line of codes

Requested files: CountDecades.cpp (Download) Maximum upload file size: 96 KiB

Write a C++ program named CountDecades.cpp. In this program you will have two integer arrays. One named inputArray of size 20 containing the values:

83, 2, 23, 11, 97, 23, 41, 67, 16, 25, 1 , 4, 75, 92, 52, 6, 44, 81, 8, 64

in the order specified, and an empty integer array of size 10 named outputArray.

The values in the input array range from 1 through100 inclusive, Write your C++ application using only functions that you create in your program. Your program must count the number of elements ininputArraythat fall into each decade, i.e each group of 10 between 0 and 100.:

When your program completes, outputArray should contain the number of elements that fall in each of the ranges 0-9, 10-19, 20-29, 30-39, .... 90-99

The index where a count is placed should correspond to which decade the count represents. For example the count of numbers that fall in the range 0-9 should be placed in the first element or outputArray[0] , The count of numbers that fall in the range 10-19 should be placed in the second element oroutputArray[1], and so on.

You program should print only one thing to the console, the contents of outputArray one one line with only spaces separating the elements followed by a newline (' ')

Helpful Tips:

You can copy the array initialization values by highlighting them and pressing ctrl-c

You can use the description in the introductory comment of your code.

Be sure to click the "Evaluate" button to test your program and receive a grade.

Partial credit will be given so be sure to describe your algorithm and comment your code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!