Answer:
u needa be more clear sweet pee <3
Explanation:
The image it blank and I can’t see anything it’s all white
Answer:
total_cost = cost + tax
Explanation:
Step1) Let the 2 variable for take input from user e.g price and quantity
var price ;
var quantity ;
var cost ;
var tax ;
var total_cost ;
Step2) take input from user quantity of item 'A'
step3) cost = price * quantity
Step4) tax = 0.08 * cost
Step5) total_cost = cost + tax
Step6) print the total_cost
Answer:
The code will be:
#include <stdio.h>
#include <stdlib.h>
main () {
double weight, shippingCharge, rate, segments;
int distance;
printf("Enter the weight: \n");
scanf("%lf", &weight);
printf("Enter the distance: \n");
scanf("%i", &distance);
if (weight <= 10) {
printf("Rate is $3.00 \n");
rate = 3;
} else {
printf("Rate is $5.00 \n");
rate = 5;
}
if (distance % 500 == 0) {
segments = distance / 500;
} else {
segments = distance / 500 + 1;
}
shippingCharge = rate * segments;
if (distance >1000) {
shippingCharge = shippingCharge + 10;
}
printf("Your shipping charge is $%lf\n", shippingCharge);
system ("pause");
}