Advertisement
Filip13

citanje do 0

Oct 18th, 2022
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int x;
  7. cin >> x;
  8.  
  9. int counter = 0;
  10.  
  11.  
  12. while (x != 0) {
  13. cin >> x;
  14. counter++;
  15. }
  16. cout << counter;
  17.  
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement