#include #include using namespace std; void count(int start, int stop, int step) { int i; //figure out how many digits we have int max, digits=1; max = stop; while(max/=10) digits++; if(stop < 0) digits++; for(i=start; i<=stop; i+=step) { cout << setw(digits) << i << endl; } }