fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // input
  6. int a, b;
  7. cin >> a >> b;
  8.  
  9. // process & output
  10. for (int i = a; i <= b; i++) {
  11.  
  12. if (i % 3 == 0) {
  13. cout << i << " ";
  14. }
  15. }
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5296KB
stdin
1 2
stdout
Standard output is empty