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