//164 : 배열2 - 형성평가5
#include<iostream>
using namespace std;
typedef struct {
int one;
int two;
int three;
}sixgradeclass;
int main()
{
sixgradeclass c[4];
for (int i = 0; i < 4; i++) {
cout << i + 1 << "class? ";
cin >> c[i].one
>> c[i].two
>> c[i].three;
}
for (int i = 0; i < 4; i++) {
cout << i + 1 << "class : " << (c[i].one + c[i].two + c[i].three) << '\n';
}
return 0;
}
문제 출처 : http://www.jungol.co.kr/bbs/board.php?bo_table=pbank&wr_id=64&sca=10a0
'자료구조, 알고리즘 문제 풀이 > 정올 문제 풀이' 카테고리의 다른 글
166 : 배열2 - 형성평가7 (0) | 2018.04.19 |
---|---|
165 : 배열2 - 형성평가6 (0) | 2018.04.19 |
163 : 배열2 - 형성평가4 (0) | 2018.04.18 |
161 : 배열2 - 형성평가2 (0) | 2018.04.18 |
160 : 배열2 - 형성평가1 (0) | 2018.04.18 |