#include <iostream>
using namespace std;
int main() {
int x;
int y;
cout << "Type a number 1: "; // Type a number and press enter
cin >> x; // Get user input from the keyboard
cout << "Type a number 2: "; // Type a number and press enter
cin >> y; // Get user input from the keyboard
for (int i = x; i <= y; i++) {
cout << i <<"\n";
};
return 0;
}
Объяснение:
#include <iostream>
using namespace std;
int main() {
int x;
int y;
cout << "Type a number 1: "; // Type a number and press enter
cin >> x; // Get user input from the keyboard
cout << "Type a number 2: "; // Type a number and press enter
cin >> y; // Get user input from the keyboard
for (int i = x; i <= y; i++) {
cout << i <<"\n";
};
return 0;
}
Объяснение: