Question: 1)Write a short program that uses a While or For loop to populate an array. The array can store up to 12 integers or floats.
1)Write a short program that uses a While or For loop 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 to accurately describe in your Header comments what 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.
Explain the Bug as a word file.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
