Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. //#include "pch.h"
  2. #include <iostream>
  3. #include <iomanip>
  4. #include <vector>
  5. using namespace std;
  6.  
  7. double sqr(double x) {
  8. return (x * x);
  9. }
  10.  
  11. int main()
  12. {
  13. vector<int> a(10, 0);
  14. int b = 1000;
  15. while (b != 0) {
  16. cin >> b;
  17. if (b != 0) a[b - 1]++;
  18. }
  19. for (int i = 0; i < 9; i++) {
  20. cout << a[i] << " ";
  21. }
  22. return 0;
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement