fork download
  1. PS C:\users\bion\desktop> type test.cpp
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. // Gets the a and b variables
  8. int a, b;
  9. cout << "Enter the first number: " << endl;
  10. cin >> a;
  11. cout << "Enter the second number: " << endl;
  12. cin >> b;
  13.  
  14. // Checks to make sure that a is less than b
  15. if (a > b)
  16. {
  17. cout << "The first number cannot be greater than the second number" << endl;
  18. }
  19.  
  20. else
  21. {
  22. for (a; a <= b; a++)
  23. {
  24. cout << a << endl;
  25. }
  26. }
  27.  
  28. return 0;
  29. }
  30. PS C:\users\bion\desktop> cl /EHsc /c /W4 test.cpp
  31. Microsoft (R) C/C++ Optimizing Compiler Version 18.00.30723 for x64
  32. Copyright (C) Microsoft Corporation. All rights reserved.
  33.  
  34. test.cpp
  35. PS C:\users\bion\desktop>
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty