배열에서 중첩반복분 사용하는건데요ㅠㅠ
다흰
실행결과과ex)Enter the number of scores(=20):10Enter a score: 3Enter a score: 4Enter a score: 5Enter a score: 6Enter a score: 7Enter a score: 8Enter a score: 9Enter a score: 1Enter a score: 2Enter a score: 3Student1: ***Student 2: ****Student 3: *****Student 4: ******Student 5: *******Student 6: ********Student 7: *********Student 8: *Student9: **Student 10: ***이렇게 나와야 하거든요근데 제가 짠거는#include stdio.h
#define student 20int main(void)
{
int scores[student];
int i;
int number;
int score;printf(Enter the number of scores(=20):);
scanf(%d, &number);for(i=0; inumber; i++)
{
printf(Enter a score: );
scanf(%d, &score);
for(i=1; i=number; i++)
{
printf(Student %d: \n, i);
}
}return 0;* -이모양 나오게 하는것도 잘 모르겠고중첩 for문 사용해야되는데 Enter a score - 이게 한번밖에 안도네요ㅠㅠ;Student - 이문장은 10번 정상적으로 도는데ㅠㅠ;어떻게 고쳐야 할까요?