Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void toFile(int** MX, int n) {
- ofstream fout;
- string path = "C:\\Users\\MSI\\Desktop\\ETU\\прога\\Вывод матрицы.txt";
- fout.open(path);
- if (!fout.is_open())
- {
- cout << "Ошибка открытия файла" << endl;
- }
- else {
- fout << "Наша матрица" << endl;
- for (int i = 0; i < n; i++)
- {
- for (int j = 0; j < n; j++)
- {
- fout << setw(n) << right << MX[i][j] << " ";
- }
- fout << endl;
- }
- }
- fout.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement