Answer:
// Program is written in C++ programming language
// Comments are used for explanatory purpose
// Program starts here
#include <iostream>
using namespace std;
int main()
{
// Prompt to enter values for low, high and stride
cout<<"Low : ";
cin>>a;
cout<<"High : ";
cin>>b;
cout<<"Stride : ";
cin>>c;
// Check if sequence has an end
If(c>0 && b>a)
{
// Call sequence function to print values
sequence(a,b,c);
}
else
{
cout<<"Unable to print sequence";
}
return 0;
}
// Sequence function is defined here
void sequence(int low, int high, int stride )
{
// Iterate from low to high with a difference of stride
for(int i = low; i<= high; I+=stride;)
cout<<i<<endl;
}