#include using namespace std; int main() { int userLimit1, userLimit2; cout << "Enter the number where we will start counting: "; cin >> userLimit1; cout << endl; cout << "Enter the number where we will stop counting: "; cin >> userLimit2; cout << endl; // cases // 1. userLimit1 <= userLimit2 ++ // 2. userLimit1 > userLimit2 -- if (userLimit1 <= userLimit2) { // count up. 1 -> 10 while(userLimit1 <= userLimit2) { cout << userLimit1 << endl; userLimit1++; } } else { // count down 10 -> 1 while ( userLimit1 >= userLimit2) { cout << userLimit1 << endl; userLimit1--; } } return 0; }