#include <stdio.h>
void main()
{
float wapple,wpear,wbanana,worange;
printf("请依次输入苹果,梨,香蕉,橘子的重量\n");
scanf("%f%f%f%f",&wapple,&wpear,&wbanana,&worange);
float money1,money2,mchange;
money1=2.5*wapple+1.8*wpear+2.0*wbanana+1.5*worange;
printf("应付款为:%f\n",money1);
printf("顾客缴款为:");
scanf("%f",&money2);
mchange=money2-money1;
if (money2<money1)
printf("钱不够,应该再付%f",-mchange);
else
printf("应找款:%f\n",mchange);
}