以下的code跑出來是CE
錯誤訊息:
本題目共 3 個測試點,您沒有通過任何一個測試點。(score:0)
錯誤訊息如下:
編譯錯誤, 請檢查語法是否符合系統所支援的編譯器的要求。
錯誤訊息:
/tmp/code_490667.c: In function ‘main’:
/tmp/code_490667.c:5: error: expected expression before ‘float’
/tmp/code_490667.c:6: error: expected expression before ‘float’
/tmp/code_490667.c:7: error: expected expression before ‘float’
--------------------------------------------------------------------
#include<stdio.h>
int main(){
float a, b, c, a1, b1, c1;
while(scanf("%f %f %f", &a, &b, &c)!=EOF){
a1 = float((int(100*a))/100);
b1 = float((int(100*b))/100);
c1 = float((int(100*c))/100);
if(a>0){
if(a-a1>=0.005){
a += 0.01;
}
}
else if(a<0){if(a1-a>=0.005){
a -= 0.01;
}}
if(b>0){
if(b-b1>=0.005){
b += 0.01;
}
}
else if(b<0){if(b1-b>=0.005){
b -= 0.01;
}}
if(c>0){
if(c-c1>=0.005){
c += 0.01;
}
}
else if(c<0){if(c1-c>=0.005){
c -= 0.01;
}}
printf("%.2f\n%.2f\n%.2f\n", a, b, c );
}
return 0;
}
--------------------------------------------------------------------
請問要怎麼改呢