Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <fstream>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. ifstream fin ("numere.in");
  8. int v[99] = {0};
  9.  
  10. int x, n, nmax;
  11.  
  12. while(fin >> x)
  13. {
  14. v[x]++;
  15.  
  16. if (v[x] > nmax)
  17. {
  18. nmax = v[x];
  19. n = x;
  20. }
  21. }
  22.  
  23. cout << n;
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement