Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- #include <fstream>
- int main()
- {
- std::ofstream FILE1("FILE1.txt");
- std::string TEXT;
- std::cout << "Insert text with nubmers in it:" << std::endl;
- std::getline(std::cin, TEXT);
- FILE1 << TEXT;
- FILE1.close();
- size_t size = TEXT.size();
- for (size_t i = 0; i < size; i++)
- if (TEXT[i] > 47 && TEXT[i] < 58)
- TEXT[i] = 33;
- std::ofstream FILE2("FILE2.txt");
- FILE2 << TEXT;
- FILE2.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement