數(shù)組計(jì)算平均數(shù),這塊代碼反復(fù)看都看不出問題。輸出 bash:syntax error near unexpected token `('#include <stdio.h>int main(void){ int grades[10]; unsigned int count = 10; long sum = 0L;
float average = 0.0f; //printf("\nEnter the number of people in your class:");
//scanf("%u", &count);
for(unsigned int i = 0 ; i < count ; ++i)
{ printf("The grade of class number %2u is", i+1); scanf("%d", &grades[i]);
sum += grades[i];
}
average = (float)sum/count; printf("The average grade of the class is: %.2f", average); return 0;
}
[C]bash:syntax error near unexpected token `('
幕布斯6054654
2019-01-03 09:10:13