summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew <saintruler@gmail.com>2021-02-10 22:44:35 +0400
committerAndrew <saintruler@gmail.com>2021-02-10 22:44:35 +0400
commit43a261149b8bd3d811a330ff6cb6c1e774fd14d7 (patch)
tree45096cc274f0ee3a817e661b66370bccc66454b0
parentba978063064e32a6e76fd6eb295876e470b30313 (diff)
Исправил 8 задачу
-rw-r--r--structures/task8.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/structures/task8.cpp b/structures/task8.cpp
index 099795d..15832d2 100644
--- a/structures/task8.cpp
+++ b/structures/task8.cpp
@@ -39,16 +39,16 @@ int main()
cout << "n = ";
cin >> n;
stack *head = NULL;
- char x;
+ int x;
for (int i = 0; i < n; i++)
{
cin >> x;
- push(head, int(x));
+ push(head, x);
}
reverse(head);
stack *res = result(head);
while (res)
- cout << char(pop(res)) << " ";
+ cout << pop(res) << " ";
cout << endl;
return 0;