求大家帮忙找找错
#include<stdio.h>#define COST1 1.25f
#define COST2 0.65f
#define COST3 0.89f
#define LIMIT 100.0f
#define DISCOUNT 0.05f
#define TRASPT1 3.50f
#define TRASPT2 10.00f
#define TRASPT3 8.0f
#define TRASPT4 0.1f
#define LIMIT1 5.0f
#define LIMIT2 20.0f
int main(void)
{
begaining: float a, b, c;
float d, e, f; float g, h;
a = 0; b = 0; c = 0;
int i;
char ch;
//输入
one:while ((ch = getchar()) != 'q')
{
switch (ch)
{
case'a':
scanf_s("%f", &a);
break;
case'b':
scanf_s("%f", &b);
break;
case'c':
scanf_s("%f", &c);
break;
default:
printf("Please input a b c to input or q to quit\n");
goto one;
break;
}
}
if (ch == 'q')
return 0;
if ((a == 0 )&(b == 0) &( c == 0))
return 0;
//计算
d = a + b + c;
if (d <= LIMIT1)
g = TRASPT1;
else if (d <= LIMIT2)
g = TRASPT2;
else
g = TRASPT3 + (d-20)*TRASPT4;
e = a*COST1 + b*COST2 + c*COST3;
if (e >= LIMIT)
h = e*(1 - DISCOUNT) + c;
else
h = e + c;
f = DISCOUNT*100;
//输出
printf("You ordered %.2f a %.2f b and %.2f\n ", a, b, c);
printf("Your order sumed is %.2f\n", d);
if (a != 0)
printf("A is %.2f dollar/pound ",COST1);
if (b != 0)
printf("B is %.2f dollar/pound ", COST2);
if (c != 0)
printf("C is %.2f dollar/pound ", COST3);
printf("The sum is %f\n", e);
if (e >= LIMIT)
printf("The discount is %.2f%%\n", f);
printf("The transportation is %.2f\n", g);
printf("The final cost is %.2f\n", h);
printf("Do your want to order more? 1 is yes 0 is no \n");
scanf_s("%d", &i);
start:switch (i)
{
case 1:
goto begaining;
break;
case 0:
break;
default:
printf("Please input 1 or 0,others are errors");
goto start;
}
return 0;
}
错误提示:缺少“;”(在“类型”的前面) 我怎么找也没找到哪缺';',到底哪错了?