/0
This commit is contained in:
parent
283efdaf55
commit
7207054466
@ -34,6 +34,10 @@ int main() {
|
|||||||
printf("%.2f \n",databaza[counter-2].price);
|
printf("%.2f \n",databaza[counter-2].price);
|
||||||
}
|
}
|
||||||
if(input[0] == '/'){
|
if(input[0] == '/'){
|
||||||
|
if(databaza[counter-1].price == '0'){
|
||||||
|
printf("division by zero");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
printf("%.2f \n",databaza[counter-2].price);
|
printf("%.2f \n",databaza[counter-2].price);
|
||||||
printf("%.2f %.2f \n",databaza[counter-2].price, databaza[counter-1].price);
|
printf("%.2f %.2f \n",databaza[counter-2].price, databaza[counter-1].price);
|
||||||
databaza[counter-2].price = databaza[counter-2].price / databaza[counter-1].price;
|
databaza[counter-2].price = databaza[counter-2].price / databaza[counter-1].price;
|
||||||
|
Loading…
Reference in New Issue
Block a user