consolidate all repos to one for archive
This commit is contained in:
15
semester_2/programiranje_2/primeri/Example01a/Stack01a.cpp
Normal file
15
semester_2/programiranje_2/primeri/Example01a/Stack01a.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "Stack01a.h"
|
||||
|
||||
void init(Stack& s) {
|
||||
s.top = EMPTY; }
|
||||
|
||||
void push(Stack& s, int n) {
|
||||
s.arr[++s.top] = n; }
|
||||
|
||||
int pop(Stack& s) {
|
||||
return s.arr[s.top--];}
|
||||
|
||||
int isEmpty(Stack& s) {
|
||||
return s.top == EMPTY;}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user