Advertisement
Sanlover

Untitled

Dec 4th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int tmp, first, n_mulptiply = 0;
  7.  
  8. cin >> first;
  9. tmp = first;
  10.  
  11. while (tmp != 0)
  12. {
  13. cin >> tmp;
  14. if (tmp != 0 && tmp % first == 0)
  15. n_mulptiply++;
  16. }
  17.  
  18. cout << "Number of elements multiplies of 4 = " << n_mulptiply;
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement