怎么中间输进的值是空的
while (i!='#'){
printf("Enter student's number\n");
scanf("%s",p[k]);
k++;
printf("Enter student's name\n");
scanf("%s",p[k]);
k++;
printf("Enter student's subject\n");
scanf("%s",p[k]);
k++;
printf("Enter the value of the subject\n");
scanf("%s",p[k]);
k++;
printf("Enter the mark of the student\n");
scanf("%s",p[k]);
k++;
printf("If end? yes='#',no='anykey'\n");
i=getchar();
i=getchar();
}
怎么中间输进的值是空的,还有最后这个值不获取两次,就跳过去了,怎么回事呀