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