Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- using namespace std;
- int main()
- {
- char a;
- ifstream file ("txt.txt");
- ofstream file1 ("txt1.txt");
- file1 << "[b]";
- while (file >> a)
- {
- if (a == ' ') {file1 << ' ';}
- else if (a != '\n') {file1 << a;}
- else if (a == '\n') {file1 << "[b]" << '\n' << "[b]";}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement