fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int x,y;
  7. cin>>x>>y;
  8. if(x<y)
  9. {
  10. do
  11. {
  12. cout<<x<<" ";
  13. x++
  14. }
  15. while (x<=y);
  16.  
  17. }else
  18. {
  19. do
  20. {
  21. cout<<x<<" ";
  22. x--;
  23. }
  24. while (x>=y);
  25. }
  26. return 0;
  27. }
Compilation error #stdin compilation error #stdout 0s 15240KB
stdin
2
10
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:14:1: error: expected ‘;’ before ‘}’ token
 }
 ^
stdout
Standard output is empty