Update cv3/program.c

This commit is contained in:
Yurii Yakovenko 2024-10-14 20:24:44 +00:00
parent f66c405e61
commit 523b0273e6

View File

@ -2,8 +2,8 @@
#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
///@
#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);
}