void calculateBill(float discount_price, float total_price) { float final_price = total_price - discount_price; printf("Total price before discount: %.2f\n", total_price); printf("Discount: %.2f\n", discount_price); printf("Final bill after discount: %.2f\n", final_price); }
int main() { float apple_qty, mango_qty, grapes_qty, strawberries_qty;
printf("Enter the quantity of Apples (in kg): ");
scanf("%f", &apple_qty); printf("Enter the quantity of Mangoes (in kg): "); scanf("%f", &mango_qty); printf("Enter the quantity of Grapes (in kg): "); scanf("%f", &grapes_qty); printf("Enter the quantity of Strawberries (in kg): "); scanf("%f", &strawberries_qty);