#include < stdio . h >
typedef struct
{
int num ;
char name [9];
float score [3];
} STU ;
void show ( STU tt )
{ int i ;
printf ("% d % s :", tt . num ,tt.name);
for ( i =0; i <3; i ++)
printf ("%5.1f", tt . score [ i ]);
printf ("\ n ");
}
void modify (————————————* ss , float a )
{ int i ;
for ( i =0; i <3; i ++)
ss ->——————————*= a ;
}
int main ()
{ STU std =(1," Zhanghua ",76.5,78.0,82.0);
float a ;
scanf ("% f ",& a );
modify ( ————————————, a );
show ( std );
return 0;
}
答案: STU score[i] &std