From bc035ad7c41828f27c7cd9605a0b4f1683de65d4 Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 11 Feb 2021 00:01:37 +0400 Subject: =?UTF-8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88=D0=BE=D0=B5?= =?UTF-8?q?=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B2=2018=20=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- structures/task18.cpp | 6 +++--- 1 file 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; -- cgit v1.2.3