Question: Your goal for this exercise is to make a program that counts up from 0 to a number by a given step size, and store

Your goal for this exercise is to make a program that counts up from 0 to a number by a given step size, and store each step in a dynamically allocated array
Start by asking the user for two arguments from the command line that are converted to integers:
The first argument is the number (or step size) to count by.
The second argument is the number to stop counting at (or maximum number).
Then dynamically allocate an array of an appropriate size to store all steps towards the maximum number. Have a separate function (not main) that counts from 0 to the maximum number, stores
each step of counting into the array, and returns the array. Lastly, print the array to the screen in the main function.

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 Programming Questions!