Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- #include <iostream>
- using namespace std;
- int main(int argc, char* argv[])
- {
- ofstream fout("TEXT.txt");
- fout << "к1е2к3";
- fout.close();
- setlocale(LC_ALL, "rus");
- char buff;
- ifstream fin("TEXT.txt");
- if (!fin.is_open())
- cout << "Файл не может быть открыт!\n";
- {
- while (fin.get(buff)) {
- if (buff >= '0' && buff <= '9') {
- cout << buff << endl;
- }
- }
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement