Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- using namespace std;
- ifstream a,b;
- ofstream c;
- string x;
- string y;
- int main()
- {
- a.open("sz.txt");
- b.open("klucze2.txt");
- c.open("wynik4b.txt");
- while (a >> x)
- {
- b >> y;
- while (x.size() > y.size())
- {
- y = y + y;
- }
- for(int i = 0; i < x.size(); i++)
- {
- int kod = int(x[i]) + int(y[i]) - 64;
- if(kod > 90)
- {
- kod -= 26;
- }
- c << char(kod);
- }
- c << endl;
- }
- a.close();
- b.close();
- c.close();
- return 0;
- }
Add Comment
Please, Sign In to add comment