cv3
This commit is contained in:
parent
3eb18b6a4d
commit
9300c574c6
@ -21,6 +21,10 @@ int main(){
|
||||
return 0;
|
||||
}
|
||||
if(vstup[0] == '-' || vstup[0] == '+' || vstup[0] == '*' || vstup[0] == '/'){
|
||||
if(counter < 2){
|
||||
printf("not enough operands\n");
|
||||
return 0;
|
||||
}
|
||||
if(vstup[0] == '-'){
|
||||
mystack.values[counter-2] = mystack.values[counter-2] - mystack.values[counter-1];
|
||||
mystack.values[counter-1] = 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user