Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<fstream>
- #include<string>
- using namespace std;
- main()
- {
- ifstream dane;
- ofstream wynik;
- dane.open("anagram.txt");
- wynik.open("odp_4a.txt");
- while(!dane.eof())
- {
- string a, b, c, d, e;
- dane>>a;
- dane>>b;
- dane>>c;
- dane>>d;
- dane>>e;
- if(a.length()==b.length()&&b.length()==c.length()&&c.length()==d.length()&&d.length()==e.length())
- wynik<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<"\n";
- }
- dane.close();
- wynik.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement