I am working on a program in C++ where the user enters a start number and a skip value. The program is then suppose to display 100 numbers (starting at the start value) and increase by the skip value. (ex. start number = 10, skip number = 5, output would be 10 15 20... until 100 numbers were outputed).
here is what i have so far, and maybe some one could steer me back in the right direction:
void array()
{
int array[10][10];
int start_value;
int skip_value;
int row;
int col;
cout << "Please enter a starting value: ";
cin >> start_value;
cout << "Please enter a skip value: ";
cin >> skip_value;
array[0][0] = start_value;
cout << array[0][0] << " ";
for (row = 0; row <= 9; row++)
{
for (col = 0; col <= 9; col++)
{
array[row][col] = array[row][col] + skip_value;
cout << array[row][col] << " ";
}
row++;
col = 0;
}
}
if anyone can help me out it would be much appreciated.
thanks