[c언어][성적프로그램]


[c언어][성적프로그램]

/*성적프로그램 한사람성적프로그램 입력:이름, 국,영,수 연산: 총점, 평균 출력:이름,국,영,수,총,평*/ #include <stdio.h> void main() { char name; int score[4];//국 영 수 총 float avg; printf("이름을 입력하시오"); scanf("%c", &name); printf("국어 영어 수학 점수를 입력하시오"); scanf("%d %d %d", &score[0], &score[1], &score[2]); score[3] = score[0] + score[1] + score[2]; avg = score[3] / 3; printf("이름:%c\n", name); printf("국어점수, 수학점수, 영어점수:%d %d %d\n", score[0], score[1], score[2]); printf("총점:%d\n", score[3]); printf("평균:%f\n", avg); return 0; }...



원문링크 : [c언어][성적프로그램]