Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- ///ifstream cin("subnumar.in");
- ///ofstream cout("subnumar.out");
- int x,y,v[100]={},subnr, maxx;
- while(cin >> x){
- while(x>9){
- subnr=x%100;
- v[subnr]++;
- x/=10;
- }
- }
- for(int i=10;i<=99;i++){
- if(v[i]>maxx){
- maxx=v[i];
- }
- }
- for(int i=99; i>=10;i--){
- if(v[i]==maxx){
- cout<<i<<" ";
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement