This commit is contained in:
Matej Hajduk 2025-10-15 17:54:48 +02:00
parent 068f25cb87
commit cbe7e4d5cb

View File

@ -67,11 +67,11 @@ int main(){
case '-': result = b - a; break;
case '*': result = b * a;break;
case '/':
if(b == 0){
if(a == 0){
fprintf(stderr, "division by zero\n");
return 0;
}
result = a / b;
result = b / a;
break;
}
push(&mystack,result);