Created
May 30, 2018 07:52
-
-
Save clara-shin/20a70a4e534e414176468adb11ddc804 to your computer and use it in GitHub Desktop.
성적처리C
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int e[2]; //영어 성적을 위한 변수 | |
int m[2]; //수학 성적을 위한 변수 | |
void input_grade() { //영어, 수학 성적을 입력 받는 함수 | |
e[0] = 90; //첫 번째 학생의 영어 성적 | |
e[1] = 80; //두 번째 학생의 영어 성적 | |
m[0] = 85; //첫 번째 학생의 수학 성적 | |
m[1] = 80; //두 번째 학생의 수학 성적 | |
} | |
void output_grade() { //총점 출력하는 함수 | |
printf("%d, %d", e[0]+m[0], e[1]+m[1]); | |
} | |
void main(void) { | |
input_grade(); | |
output_grade(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment