<div style="font-family: Gulim; line-height: 21px"><span style="font-size: 9pt; line-height: 1.5">늦은밤 죄송합니다... 바로 본문으로 넘어 갈께요...</span></div> <div style="font-family: Gulim; line-height: 21px"><span style="font-size: 9pt; line-height: 1.5">2차 배열로 성적처리 프로그램을 만들어야 됩니다.</span></div> <div style="font-family: Gulim; line-height: 21px"><span style="font-size: 9pt; line-height: 1.5">#include <stdio.h></stdio.h></span></div> <div style="font-family: Gulim; line-height: 21px"><br /></div> <div style="font-family: Gulim; line-height: 21px">int main(void)</div> <div style="font-family: Gulim; line-height: 21px">{</div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>char name[5][10];</div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>int kor[5][10],eng[5][10],mat[5][10];</div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>int i;</div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>printf("5 명의 학생 정보를 입력하세요.n");</div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>for(i=0;i<5;i++)</div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>{</div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>printf("이름 : ");</div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>scanf("%s",name[i]);</div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>printf("국어, 영어, 수학 점수 : ");</div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>scanf("%d %d %d",&kor[i],&eng[i],&mat[i]);</div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>}</div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span></div> <div style="font-family: Gulim; line-height: 21px"><br /></div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>printf("n이름 국어 영어 수학 합계 평균n");</div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>for(i=0;i<5;i++)</div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>{</div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>printf("%-10s %3d| %3d| %3d|n",name[i],kor[i],eng[i],mat[i]);</div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span></div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>}</div> <div style="font-family: Gulim; line-height: 21px"><br /></div> <div style="font-family: Gulim; line-height: 21px"><span class="Apple-tab-span" style="white-space: pre"> </span>return 0;</div> <div style="font-family: Gulim; line-height: 21px">}</div> <div style="font-family: Gulim; line-height: 21px">일단 실행은 되긴 하는데 입력은 문제없이되요....</div> <div style="font-family: Gulim; line-height: 21px">그런데 출력값이 이상하게 나와요....</div> <div style="font-family: Gulim; line-height: 21px">글구 합계랑 평균값은 아예 손을 못대겠어요....</div> <div style="font-family: Gulim; line-height: 21px">정말 죄송하지만 뭐가 문제인지 합계랑 평균값은 어떻게 구하는지 알려주시면 감사하겠습니다..ㅜㅜ</div>
댓글 분란 또는 분쟁 때문에 전체 댓글이 블라인드 처리되었습니다.