diff options
| author | Andrew <saintruler@gmail.com> | 2021-02-10 22:44:35 +0400 |
|---|---|---|
| committer | Andrew <saintruler@gmail.com> | 2021-02-10 22:44:35 +0400 |
| commit | 43a261149b8bd3d811a330ff6cb6c1e774fd14d7 (patch) | |
| tree | 45096cc274f0ee3a817e661b66370bccc66454b0 | |
| parent | ba978063064e32a6e76fd6eb295876e470b30313 (diff) | |
Исправил 8 задачу
| -rw-r--r-- | structures/task8.cpp | 6 |
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; |