CODE 104
#include<stdio.h>
int main(void){
int kor,mat, eng, sum=0, avg=0;
kor = 90;
mat = 80;
eng = 100;
sum = (kor+mat+eng);
avg=(kor+mat+eng)/3;
printf("kor %d\nmat %d\neng %d\nsum %d\navg %d",kor,mat,eng,sum,avg);
return 0;
}
CODE 105
#include<stdio.h>
int main(void) {
char Seoul[] = "Seoul";
char Seoul_[] = "10, 312, 545";
char Seoul1_[] = "+91, 375";
char Pusan[] = "Pusan";
char Pusan_[] = "3, 567, 910";
char Pusan1_[] = "+5, 868";
char Incheon[] = "Incheon";
char Incheon_[] = "2, 758, 296";
char Incheon1_[] = "+64, 888";
char Daegu[] = "Daegu";
char Daegu_[] = "2, 511, 676";
char Daegu1_[] = "+17, 230";
char Gwangju[] = "Gwangju";
char Gwangju_[] = "1, 454, 636";
char Gwangju1_[] = "+29, 744";
printf("%15s%15s%15s\n", Seoul, Seoul_, Seoul1_);
printf("%15s%15s%15s\n", Pusan, Pusan_, Pusan1_);
printf("%15s%15s%15s\n", Incheon, Incheon_, Incheon1_);
printf("%15s%15s%15s\n", Gwangju, Gwangju_, Gwangju1_);
return 0;
}
'프로그래밍 > C_정보올림피아드 Language_Coder' 카테고리의 다른 글
CODE 633 반복제어문 1 자가진단6 (0) | 2020.09.02 |
---|---|
CODE 538 반복제어문 1 자가진단 3~4 (0) | 2020.09.01 |
CODE 120~124 선택제어문 - 형성평가 1~5 (0) | 2020.08.31 |
CODE 518~525 연산자 - 자가진단1~ (0) | 2020.08.31 |
CODE 106~110 입력 - 형성평가 1~5 (0) | 2020.08.30 |