Code:
#include <iostream>
int main(void)
{
int min,max,i;
cout << "Input your first number to count from: ";
cin >> min;
cout << "Input your last number to count to: ";
cin >> max;
for(i=min; i <= max; i++)
cout << i << endl;
cout<<"\nPress a key to continue ";
while (cin.get() != '\n');
cin.get();
return 0;
}
This works for me and should work everywhere.
Add using namespace std; like in one of the previous messages if this does not work. Generally one should use std:: before all the cout:s and cin:s.