Added my works from 2022

This commit is contained in:
2024-11-21 09:38:09 +03:00
parent 5341eed7ea
commit 42cb45db32
12 changed files with 1137 additions and 0 deletions

35
task9.h Normal file
View File

@@ -0,0 +1,35 @@
#include <iostream>
#include <stack>
#include <fstream>
#include <string>
using namespace std;
#pragma once
namespace task9 {
int init()
{
cout << "TASK #9" << endl;
setlocale(LC_ALL, "Russian");
stack<char> chars;
ifstream input("C:\\input.txt");
string data;
while (getline(input, data))
{
for (char& c : data)
{
chars.push(c);
}
while (!chars.empty())
{
cout << chars.top();
chars.pop();
}
cout << endl;
}
return 0;
}
}