fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // Input
  6. int a, b; cin >> a >> b;
  7.  
  8. // Process -> Output
  9. if (a > b) swap(a, b);
  10. for (int i = a; i <= b; ++i)
  11. cout << i << ' ';
  12.  
  13. return 0;
  14. }
  15.  
  16.  
Success #stdin #stdout 0s 5296KB
stdin
10 3
stdout
3 4 5 6 7 8 9 10