cv3 cv3 cv3
This commit is contained in:
parent
6324b6bf2f
commit
448b98b879
@ -107,12 +107,13 @@ int main(int argc, char const *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(calculate(&calc_stack, buf[0]) == 1)
|
int calc_code = calculate(&calc_stack, buf[0]);
|
||||||
|
if(calc_code == 1)
|
||||||
{
|
{
|
||||||
printf("division by zero\n");
|
printf("division by zero\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if(calculate(&calc_stack, buf[0]) == 2)
|
else if(calc_code == 2)
|
||||||
{
|
{
|
||||||
printf("not enough operands\n");
|
printf("not enough operands\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user