- #include<stdio.h>
- int main(void)
- {
- char name[100][100];//이름 2차원배열
- char graph[100];//5점당 *을하나씩해야할때 저장할 배열
- int dab[10] = { 1, 2, 3, 4, 1, 2, 3, 4, 1, 2 };//정답
- int jum[10];//입력할 답
- int cnt = 0;
- int total[100] = { 0 };//맞출시 10점획득
- int total1[100]; //A,B,C...F까지 학점구하기 TOTAL/10
- int i, j;
- int tel = 0, len = 0;;
- char temp[1000];//O,X저장할배열
- int ch;
- char ren;
- while (1)
- {
- for (i = 0; i<10; i++)
- for (i = 0; i<10; i++)
- {
- if (dab[i] == jum[i]) //정답과 자신이입력한 답맞을시 10점추가및 O,X구하기
- {
- temp[len] = 'O';
- total[cnt] += 10;
- }
- else
- temp[len] = 'X';
- len++;//temp[len]->temp[0],temp[1]...temp[n]
- }
- cnt++;
- if (ren == EOF)
- break;
- else if(ren > 0)
- continue;
- }
- for (i = 0; i<cnt; i++)
- total1[i] = total[i] / 10; //만약 점수가 100점이라면 10점으로나누어버림
- for (i = 0; i<cnt; i++)
- {
- for (j = 0; j<10; j++)
- {
- tel++;
- }
- for (j = 0; j<total[i] / 5; j++)
- switch (total1[i]) //total[i]/10해서 각각의숫자마다 학점부여
- {
- }
- if (total1[i]<4) //case4까지있으니 그미만으로는 F줌
성처리 코드라니..야하네여
http://ideone.com/e.js/kY7tqI