Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int Gy[1000],N;
- void Olvas()
- {
- int x;
- ifstream f("szamok.txt");
- f>>N;
- for(int i=0;i<N-1;i++)
- {
- f>>x;
- Gy[x]++;
- }
- f.close();
- }
- void Nyomtat()
- {
- ofstream f("novekvo.txt");
- for(int i=0;i<=999;i++)
- for(int j=1;j<=Gy[i];j++)
- f<<i<<" ";
- f.close();
- }
- int main()
- {
- Olvas();
- Nyomtat();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement