Print? /* Start the comments in the program header (to avoid any problems encountered during the submission of blog posts, the slash used to indicate that the comments have been deleted)
* Copyright and version Declaration of the program
* All rights reserved.
* File name: txt. c
* Author: liuyongshui
* Question: Enter the scores of three students in three courses to calculate the total score and average score of each student.
* Completion date: January 1, April 8, 2013
* Version No.: V1.0
*/
# Include <stdio. h>
Int main ()
{
Int I;
Int j;
Float stu [3] [3];
Float sum [3] = {0 };
Float aver [3] = {0 };
Printf ("Enter the English high C language score for each student \ n ");
For (I = 0; I <3; I ++)
{
Printf ("% d English high C language:", I + 1 );
For (j = 0; j <3; j ++)
{
Scanf ("% f", & stu [I] [j]);
}
}
For (I = 0; I <3; I ++)
{
For (j = 0; j <3; j ++)
{
Sum [I] + = stu [I] [j];
}
}
For (I = 0; I <3; I ++)
{
Aver [I] = sum [I]/3;
}
Printf ("\ n total score and average score of each student \ n ");
For (I = 0; I <3; I ++)
{
Printf ("% d total score: % f average score: % f \ n", I + 1, sum [I], aver [I]);
}
Return 0;
}
/* Start the comments in the program header (to avoid any problems encountered during the submission of blog posts, the slash used to indicate that the comments have been deleted)
* Copyright and version Declaration of the program
* All rights reserved.
* File name: txt. c
* Author: liuyongshui
* Question: Enter the scores of three students in three courses to calculate the total score and average score of each student.
* Completion date: January 1, April 8, 2013
* Version No.: V1.0
*/
# Include <stdio. h>
Int main ()
{
Int I;
Int j;
Float stu [3] [3];
Float sum [3] = {0 };
Float aver [3] = {0 };
Printf ("Enter the English high C language score for each student \ n ");
For (I = 0; I <3; I ++)
{
Printf ("% d English high C language:", I + 1 );
For (j = 0; j <3; j ++)
{
Scanf ("% f", & stu [I] [j]);
}
}
For (I = 0; I <3; I ++)
{
For (j = 0; j <3; j ++)
{
Sum [I] + = stu [I] [j];
}
}
For (I = 0; I <3; I ++)
{
Aver [I] = sum [I]/3;
}
Printf ("\ n total score and average score of each student \ n ");
For (I = 0; I <3; I ++)
{
Printf ("% d total score: % f average score: % f \ n", I + 1, sum [I], aver [I]);
}
Return 0;
}