안녕하세요. 대견한제비295입니다.
예제 코드 적어드립니다
예제코드에 따라서 보시면 결과 출력을 반복으로 사용했을경우 정답이 표시 됩니다
#include <stdio.h>
int main() {
int problemCount = 10;
int correctAnswers[4] = {0, 0, 0, 0};
int userAnswers[problemCount][4];
int correctCount = 0;
int wrongCount = 0;
for (int i = 0; i < problemCount; i++) {
printf("문제 %d\n", i + 1);
for (int j = 0; j < 4; j++) {
printf("%d번째 숫자 입력: ", j + 1);
scanf("%d", &userAnswers[i][j]);
}
if (isCorrectAnswer(userAnswers[i])) {
correctCount++;
} else {
wrongCount++;
}
}