fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int liczba_koszy;
  6. cin >> liczba_koszy;
  7. while (liczba_koszy !=8) {
  8. if ( (liczba_koszy)%2 == 0)
  9. cout << liczba_koszy << " ";
  10. cin >> liczba_koszy;
  11. }
  12. cout << liczba_koszy;
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 5288KB
stdin
2 5 1 7 6 10 8
stdout
2 6 10 8