#include<iostream>
using namespace std;

void countIncrement(float numberList[], int &list_length, float start, float end, float interval);

int main()
{
 float start, end, interval;
 float numberList[200];

 // Get start, end, interval
 cout << "Give me a start: ";
 cin >> start;
 cout << "Give me a finish: ";
 cin >> end;
 cout << "Give me an increment: ";
 cin >> interval;

 // Fill in array, counting up by interval
 int totalElements=0;
 countIncrement(numberList,totalElements, start,end,interval);

 int i=0;
 // Print out elements of array
 for(i=0; i<totalElements; i++)
   cout << numberList[i] << " ";
 // Print a new line
 cout << endl;

 return 0;
}


// Fill in array, counting up by interval
void countIncrement(float numberList[], int &list_length, float start, float end, float interval)
{
 for(float currentNum=start; currentNum<=end; currentNum+=interval)
 {
   numberList[list_length] = currentNum;
   list_length++;
 }
}