From 43a261149b8bd3d811a330ff6cb6c1e774fd14d7 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 10 Feb 2021 22:44:35 +0400 Subject: =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=208=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- structures/task8.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'structures/task8.cpp') 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; -- cgit v1.2.3