/
mando
/
DZ12_1
Обзор
Документация
Войти
/
mando
/
DZ12_1
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Source.cpp
37 строк
573 B
mando
DZ12_1
18 фев 2026, 00:02
Верифицирован
18 фев 2026, 00:02
b3e631d
Код
Авторство
О чём код?
#include <iostream> #include <fstream> #include <string> int main() { setlocale(LC_ALL, "Russian"); std::ofstream ofile{ "file.txt", }; if (ofile.is_open()) { ofile << "������ ������ ��������" << std::endl; ofile << "����� ���� ������ ������" << std::endl; ofile << "������� �������� ������� ������" << std::endl; } ofile.close(); std::ifstream ifile{ "file.txt" }; if (ifile.is_open()) { std::string data{}; while (ifile >> data) { std::cout << data << std::endl; } } ifile.close(); return 0; }