Open minseo-jung opened 5 years ago
성적프로그램에 학생의 이름이나 과목도 입력받아서 배열을 넣을 수 있을까요? 제가 알기로는 문자열을 입력받을 때는 문자열에 있는 문자의 개수만큼 그 칸을 잡기 때문에 사람의 이름 철자 수가 3글자 2글자 4글자 이런식으로 다르다면 문제가 생길것 같은데 이런걸 해결할 방법이 있을까요?
좋은 방법은 아닌데 software적으로 직접 싱크맞춰주는 방식도 있어 아래처럼 학생이름, 과목 3개, 점수 3개 형태로 해서 index간 잘 맞춰서 입력받고, 출력해주면 될거야. char name[5]; char class[5][3]; int score[5][3];