Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "Header.h"
- using namespace std;
- int main() {
- setlocale(0, "");
- int i = 1, k;
- int a;
- //Node *top = first(NULL);
- Node *top = NULL;
- cout << "Введите количество элементов стека: ";
- cin >> k;
- cout << "Введите любые " << k << " чисел: ";
- while (i <= k) {
- cin >> a;
- push(&top, a);
- i++;
- }
- /*if (pop(&top) != 0) {
- }*/
- for (int i = 0; i < k; i++) {
- cout << pop(&top) << "\n";
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement