consolidate all repos to one for archive
This commit is contained in:
30
semester_2/programiranje_2/primeri/Example01a/main.cpp
Normal file
30
semester_2/programiranje_2/primeri/Example01a/main.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#include <iostream>
|
||||
#include "Stack01a.h"
|
||||
|
||||
int main() {
|
||||
Stack my_stack1;
|
||||
init(my_stack1);
|
||||
|
||||
Stack my_stack2;
|
||||
init(my_stack2);
|
||||
|
||||
push(my_stack1, 7);
|
||||
push(my_stack1,1);
|
||||
push(my_stack2, 3);
|
||||
|
||||
//my_stack1.top=0;
|
||||
//my_stack1.arr[1]=4;
|
||||
std::cout << pop(my_stack1) << " ";
|
||||
std::cout << pop(my_stack1) << " ";
|
||||
std::cout << std::endl;
|
||||
|
||||
if (isEmpty(my_stack1))
|
||||
std::cout << "Stack1 is empty" << std::endl;
|
||||
else
|
||||
std::cout << "Stack1 isn't empty" << std::endl;
|
||||
if (isEmpty(my_stack2))
|
||||
std::cout << "Stack2 is empty" << std::endl;
|
||||
else
|
||||
std::cout << "Stack2 isn't empty" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user