|
5啊哈币
#include <stdio.h>
#include <stdlib.h>
int main()
{
float c,t,a=0,b=0,p,d;
printf("Please enter the numble.jacket:");
scanf("%f",&c);
printf("\n trousers:");
scanf("%f",&t);
if(c>=t) {a=c-t;p=t;}
else {b=t-c;p=c;}
if(p>=50) d=a*60+b*45+p*80;
else d=a*60+b*45+p*90;
pirntf("You should pay %.2f dollar.",d);
system("pause");
return 0;
}
error:id returned 1 exit status
|
|