Trying
This commit is contained in:
parent
08fee34c39
commit
314d955233
@ -2,7 +2,7 @@
|
|||||||
#include<stdlib.h>
|
#include<stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#define STACK_SIZE 10000
|
#define STACK_SIZE 10
|
||||||
|
|
||||||
struct stack{
|
struct stack{
|
||||||
float values[STACK_SIZE];
|
float values[STACK_SIZE];
|
||||||
@ -65,6 +65,10 @@ void process_operations(struct stack* stack) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if(stack->size == STACK_SIZE){
|
||||||
|
printf("full stack\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
char *endptr;
|
char *endptr;
|
||||||
if (line[0] == '.')
|
if (line[0] == '.')
|
||||||
{ printf("bad input\n");
|
{ printf("bad input\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user