test2
This commit is contained in:
parent
2473430d3a
commit
2eed7096b9
@ -22,28 +22,28 @@ int main() {
|
||||
databaza[counter].price = number;
|
||||
|
||||
if(input[0] == '+'){
|
||||
printf("%.2f\n",databaza[counter-2].price);
|
||||
printf("%.2f %.2f\n",databaza[counter-2].price, databaza[counter-1].price);
|
||||
printf("%.2f \n",databaza[counter-2].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;
|
||||
printf("%.2f\n",databaza[counter-2].price);
|
||||
printf("%.2f \n",databaza[counter-2].price);
|
||||
}
|
||||
if(input[0] == '-'){
|
||||
printf("%.2f\n",databaza[counter-2].price);
|
||||
printf("%.2f %.2f\n",databaza[counter-2].price, databaza[counter-1].price);
|
||||
printf("%.2f \n",databaza[counter-2].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;
|
||||
printf("%.2f\n",databaza[counter-2].price);
|
||||
printf("%.2f \n",databaza[counter-2].price);
|
||||
}
|
||||
if(input[0] == '/'){
|
||||
printf("%.2f\n",databaza[counter-2].price);
|
||||
printf("%.2f %.2f\n",databaza[counter-2].price, databaza[counter-1].price);
|
||||
printf("%.2f \n",databaza[counter-2].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;
|
||||
printf("%.2f\n",databaza[counter-2].price);
|
||||
printf("%.2f \n",databaza[counter-2].price);
|
||||
}
|
||||
if(input[0] == '*'){
|
||||
printf("%.2f\n",databaza[counter-2].price);
|
||||
printf("%.2f %.2f\n",databaza[counter-2].price, databaza[counter-1].price);
|
||||
printf("%.2f \n",databaza[counter-2].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;
|
||||
printf("%.2f\n",databaza[counter-2].price);
|
||||
printf("%.2f \n",databaza[counter-2].price);
|
||||
}
|
||||
counter++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user