diff --git a/cv3/program.c b/cv3/program.c index 30ad455..255cf7c 100644 --- a/cv3/program.c +++ b/cv3/program.c @@ -2,8 +2,8 @@ #include #include #include -///@ -#define STACK_SIZE 500 +//// @ +#define STACK_SIZE 11 struct Stack { @@ -89,7 +89,9 @@ int main() else { if(isdigit(c)) + { rez=atof(buf); + } else { err=1; @@ -99,6 +101,12 @@ int main() if(!err) { + if(count_stack(&mystack)==STACK_SIZE) + { + printf("full stack\n"); + err=4; + break; + } push_stack(&mystack, rez); print_stack(&mystack); }