Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <string>
- #include <fstream>
- using namespace std;
- int main()
- {
- string str, s;
- int n = 0;
- ifstream Input("My life.txt");
- ofstream Output("My rules.txt");
- while (!Input.eof())
- {
- str = "";
- s = Input.get();
- while (s != "\n" && !Input.eof())
- {
- str = str + s;
- s = Input.get();
- }
- n = str.size();
- for (int i = n - 1; i > -1; i--)
- Output << str[i];
- Output << endl;
- }
- Input.close();
- Output.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement