CodePudding user response:
No one?CodePudding user response:
# include
//space interval input
Int main ()
{
int a;
A double ch, ma;
Char birth [8].
char sex;
Printf (" input student id, birthday, gender, language, mathematics achievement: \ n ");
The scanf (" % d ", & amp; A);
Char x=getchar ();
for(int i=0; i <8; I++)
{
The scanf (" % c ", & amp; Birth [I]);
}
X=getchar ();
Lf the scanf (" % c % % lf ", & amp; Sex, & amp; Ch, & amp; Ma);
Printf (" student id: % d \ n birthday: ", a);
for(int i=0; i <8; I++)
Printf (" % c ", birth [I]);
Gender: printf (" \ n \ n % c language result: % f \ n math: % f \ n score: % f ", sex, ch, ma, + ma (ch)/2);
return 0;
}
CodePudding user response:
[color# include & lt; the stdio. H>Typedef struct
{
Int no;
Char birth [9].
Char sex [8].
Float Chi_score;
Float Math_score;
Float ave.
} Stu.
Int main ()
{
Stu Stu.
Printf (" input student number: ");
The scanf (" % d ", & amp; Stu. No);
Printf (" input birthday: ");
The scanf (" % s ", stu. Birth);
Printf (" input gender: ");
The scanf (" % s ", stu. Sex);
Printf (" input language result: ");
The scanf (" % f ", & amp; Stu. Chi_score);
Printf (" input mathematics performance: ");
The scanf (" % f ", & amp; Stu. Math_score);
Printf (" student information is as follows: \ n ");
Stu. Ave=(stu. Chi_score + stu. Math_score)/2;
Printf (" gender: student id: % d birthday: % s % s language result: %. 1 f math: %. The average grade: 1 f %. 1 f ", stu. No, stu. Birth, stu. Sex, stu. Chi_score, stu. Math_score, stu. Ave);
return 0;
}
CodePudding user response:
The