fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int t;
  6. cin >> t;
  7. while(t--) {
  8. int x;
  9. cin >> x;
  10.  
  11. if(x == 0) {
  12. cout << "Eh, moj algorytm jeszcze nie poradzi sobie z x = 0!" << endl;
  13. }
  14. else {
  15. cout << "Mam liczbe " << x << endl;
  16. }
  17.  
  18. //... skomplikowany algorytm ktory poradzi sobie z kazdym x roznym od 0
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5304KB
stdin
3
2
1
0
stdout
Mam liczbe 2
Mam liczbe 1
Eh, moj algorytm jeszcze nie poradzi sobie z x = 0!