fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. const int TEN = 10;
  5.  
  6. int main() {
  7. int no, count = 0;
  8. while (no >= 0) {
  9. cin >> no;
  10. --no;
  11. if (no % TEN == 0 ) {
  12. ++count;
  13. //cout << no << " ";
  14.  
  15. }
  16. //cout << no << " ";
  17.  
  18. }
  19. cout << count;
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5284KB
stdin
100
59 -> 6
60 -> 6
99 -> 10
Bustamante Thiago
9:24 PM
0 -> 0

1 -> 1

10 -> 2
19 

90 -> 9

99 -> 9
 
55 -> 6
stdout
Standard output is empty