update cv3

This commit is contained in:
Ivan Leichenko 2024-10-14 14:24:03 +02:00
parent 485e58badb
commit f04f75c1ac

View File

@ -39,13 +39,13 @@ float calculate(struct stack* stack, char operator)
res = num1+num2;
break;
case '-':
res = num1-num2;
res = num2-num1;
break;
case '*':
res = num1*num2;
break;
case '/':
res = num1/num2;
res = num2/num1;
break;
}
add(stack, res);
@ -80,7 +80,7 @@ int main(int argc, char const *argv[])
}
for (int i = 0; i < calc_stack.size; i++)
{
printf("%0.f ", calc_stack.values[i]);
printf("%2.f ", calc_stack.values[i]);
}
printf("\n");
}