#include <stdio.h>
struct bodytest
{
int no[20];
char bloodtype;
double eyesight;
int weight;
};
void main()
{
int i;
struct bodytest p1[5];
printf(\"학생 정보를 입력받겠습니다. \\n\");
for(i=0; i<5; i++)
{
printf(\"학번 혈액형 시력 몸무게순으로 입력하세요 : \");
scanf(\"%s %c %lf %d\", p1[i].no, &p1[i].bloodtype, &p1[i].eyesight, &p1[i].weight);
}
printf(\"학생 정보를 출력하겠습니다. \\n\");
for(i=0; i<5; i++);
{
printf(\"%s %c %lf %d\\n\",p1[i].no, p1[i].bloodtype, p1[i].eyesight, p1[i].weight);
}
}
구조체 공부중인데여
scanf 에서 입력은 잘바든것 같은데 출력하면 왜 쭝궈 문자가 뜨는거죠??
그리고 scanf_s < -- 이게 뭐에염??
for(i=0; i<5; i++); <----- 알려주지 않고 다시한번 돌아보게 해주신 천재해커님께 감사의 말씀을 ... ㅠㅠ