This commit is contained in:
Oleksandr Vyshniakov 2025-10-12 19:12:41 +02:00
parent f618b06d70
commit de6f6c6ad0
2 changed files with 8 additions and 1 deletions

Binary file not shown.

View File

@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#define STACK_SIZE 10
@ -10,6 +11,12 @@ struct stack {
};
void push_stack(struct stack* stack, float value) {
if (stack->size >= STACK_SIZE) {
printf("Error!\n");
exit(1);
}
stack->values[stack->size] = value;
stack->size++;
}