refresh
This commit is contained in:
parent
b13a37108f
commit
780529c399
@ -26,7 +26,7 @@ struct stack* create_stack (int capacity) {
|
||||
return s;
|
||||
}
|
||||
|
||||
void push_stack (struct stack* s, float value) {
|
||||
void push_stack(struct stack* s, float value) {
|
||||
if (s->size >= s->capacity) {
|
||||
printf("Stack perepolnen!\n");
|
||||
exit(1);
|
||||
@ -58,7 +58,7 @@ void destroy_stack (struct stack* s) {
|
||||
|
||||
int main() {
|
||||
struct stack* novystack = create_stack(STACK_SIZE);
|
||||
push_stack(novystack, 3,14);
|
||||
push_stack(novystack, 3.14);
|
||||
push_stack(novystack, 2.71);
|
||||
float x = pop_stack(novystack);
|
||||
printf("Popped: %2.f\n", x);
|
||||
|
Loading…
Reference in New Issue
Block a user