5번의 경우 아래와 같이 단순히 처리해보시기를 바랍니다.
data[i].money = data[i].money * (100 + pro) / 100;
data[i].money -= data[i].money % 10;
C 예제
void GMOV2(int gr, int pro) {
for (int i = 0; i < cnt; i++) {
if (data[i].group == gr) {
data[i].money = data[i].money * (100 + pro) / 100;
data[i].money -= data[i].money % 10;
}
}
}

bassrkd 2년 전
반례를 못 찾겠네요.. 도와주세요