Question: Write a short program that uses aWhileorForloop to populate an array. The array can store up to 12 integers or floats. Be sure your array
Write a short program that uses aWhileorForloop to populate an array. The array can store up to 12 integers or floats. Be sure your array variables are descriptive.
Some examples:Store 12 months of monthly rainfall; Store 12 months of monthly miles run; Store the weekly grocery costs for X weeks.; Store X days/weeks/months of the daily/weekly/monthly mileage to work/school.
Optionally,you may write a second loop to display the collected data. Or display the total sum.
Document your code with Header and in-line comments.Be sure toaccurately describein yourHeader commentswhat the code is designed to do.
THEN:Modify the code slightly to create a bug (no more than 2) that would prevent the code from compiling or even better from running correctly. But don't document the bug.Submit the buggy code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
