我收到错误
错误:“{”标记之前的预期表达式
尝试编译以下代码时:
#include <stdio.h>
int main()
{
srand (time(NULL));
int Seat[10] = {0,0,0,0,0,0,0,0,0,0};
int x = rand()%5;
int y = rand()%10;
int i, j;
do {
printf("What class would you like to sit in, first (1) or economy (2)?");
scanf("%d", &j);
if(j == 1){
Seat[x] = 1;
printf("your seat number is %d and it is type %d\n", x, j);
}
else{
Seat[y] = 1;
printf("your seat number is %d and is is type %d\n", y, j);
}
}while(Seat[10] != {1,1,1,1,1,1,1,1,1,1});
}
背景:该程序旨在成为一个航空公司座位预订系统。