summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew <saintruler@gmail.com>2021-02-11 00:01:37 +0400
committerAndrew <saintruler@gmail.com>2021-02-11 00:01:37 +0400
commitbc035ad7c41828f27c7cd9605a0b4f1683de65d4 (patch)
tree0468c9af31928e60e6b0d24348073dea89504fb7
parent93c158a42724d73b5b0a9c50bfdafb433fe70cf7 (diff)
Небольшое исправление в 18 задаче
-rw-r--r--structures/task18.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/structures/task18.cpp b/structures/task18.cpp
index f78c9ba..fcc0c67 100644
--- a/structures/task18.cpp
+++ b/structures/task18.cpp
@@ -28,11 +28,11 @@ int main()
queue *head = NULL;
queue *tail = NULL;
- char x;
+ int x;
for (int i = 0; i < n; i++)
{
cin >> x;
- push(head, tail, int(x));
+ push(head, tail, x);
}
queue *head_res = NULL;
@@ -40,7 +40,7 @@ int main()
result(head, tail, head_res, tail_res);
while (head_res)
- cout << char(pop(head_res, tail_res)) << " ";
+ cout << pop(head_res, tail_res) << " ";
cout << endl;
return 0;