Question
I need help in C++ assignment. please add statements and i am Xcode complier user. Requested files : CountDecades.cpp (Download) Maximum upload file size :
I need help in C++ assignment. please add statements and i am Xcode complier user.
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 in inputArraythat 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started