float price_per_kg;float total_price;
printf("Enter the price per 1 kg of apples: ");scanf("%f", &price_per_kg);
for(float i = 0.6; i <= 7.2; i += 0.6){total_price = price_per_kg * i;printf("%.1f kg of apples will cost $%.2f\n", i, total_price);}
return 0;
float price_per_kg;
float total_price;
printf("Enter the price per 1 kg of apples: ");
scanf("%f", &price_per_kg);
for(float i = 0.6; i <= 7.2; i += 0.6){
total_price = price_per_kg * i;
printf("%.1f kg of apples will cost $%.2f\n", i, total_price);
}
return 0;