Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Enter a positive integer n, then enter the names of n students and the score of 100%, and then convert it into two grades for output.
Enter a positive integer n, then enter the names of n students and the score of 100%, and then convert it into two grades for output.
# include & ltstdio.h & gt

# Definition? MAXN? 100

struct? student

{? Charles? Name [20];

int? Scores;

Charles? Grade;

};

Invalid? Set the level (? struct? Student? *p,? int? n? );

int? Master ()

{? int? Me? n;

struct? Student? stu[MAXN];

scanf("%d ",& ampn);

For (me? =? 0; ? Me? & lt? n; ? i++)

{? Scanf("%s%d ",Stu [me]. Name,? & Stu [me]. Score);

}

set_grade(stu,n);

For (me? =? 0; ? Me? & lt? n; ? i++)

printf("%s? %c\n ",Stu [me]. Name,? Stu [me]. Grade);

Return? 0;

}

Invalid? set_grade(struct? Student? *p,? int? n)

{? struct? Student? *q? =? p? +? n? -? 1;

while(p & lt; =q)

{? if((*p)。 Score? & gt=? 60)(*p)。 Grade? =? p’;

Or what? (*p)。 Grade? =? f’;

p++;

}

}