viod使用报错
编译时编译器报错显示说viod为在声明范围,但是我去掉viod他又能正常编译运行。
#include <stdio.h>
int main(viod) {
int x;
int count[10];
int i;
for (i = 0; i < 10; i++) {
count[i] = 0;
}
scanf("%d", &x);
while (x != -1) {
if (x >= 0 && x <= 9) {
count[x]++;
}
scanf("%d", &x);
}
for (i = 0; i < 10; i++) {
printf("%d:%d\n", i, count[i]);
}
return 0;
}