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 != 10) {
  8. if ( (liczba_koszy)%2 == 0)
  9. cout << liczba_koszy << " ";
  10. cin >> liczba_koszy;
  11. }
  12. cout << liczba_koszy;
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5292KB
stdin
4 5 3 6 10 3 5 9
stdout
4 6 10