Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- float codersprice_1 = 0, codersprice_2 = 0, codersquantity_1 = 0, codersquantity_2 = 0,
- total_1 = 0,
- total_2 = 0,
- tax = 0,
- full_amount = 0,
- cash_offering = 0,
- change = 0;
- printf("quantity of codersquantity_1\n");
- scanf("%f", &codersquantity_1);
- printf("price of codersprice_1\n");
- scanf("%f", &codersprice_1);
- printf("quantity of codersquantity_2\n");
- scanf("%f", &codersquantity_2);
- printf("price of codersprice_2\n");
- scanf("%f", &codersprice_2);
- total_1 = codersprice_1 * codersquantity_1;
- total_2 = codersprice_2 * codersquantity_2;
- tax = 0.07*(total_1 + total_2);
- full_amount= total_1 + total_2 + tax;
- change = cash_offering - full_amount;
- printf("Your total is: %.2f\n", full_amount);
- printf("Enter Changing money\n");
- int cm;
- scanf("%d", &cm);
- int b;
- b = cm;
- float a;
- a= full_amount;
- printf ("Here is your change %.2f\n", cm-a);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment