# 要发工资了！

``````5
977.20 785.32 87.56
786.43 639.23 68.10
733.43 814.72 85.11
911.12 874.98 88.42
763.22 811.00 89.21``````

``````977.20 785.32 87.56 1674.96
786.43 639.23 68.10 1357.56
733.43 814.72 85.11 1463.04
911.12 874.98 88.42 1697.68
763.22 811.00 89.21 1485.01
1535.65``````

``````
#include <stdio.h>
#define N 100
int find(int *, int, int);
int main( )
{
double salery[N][4]; //保存工资的数组
double sum,aver; //保存平均成绩的数组
int i,j,n;
scanf("%d",&n);
sum=0;
for(i=0;i<n;i++)
scanf("%lf%lf%lf",&salery[i][0],&salery[i][1],&salery[i][2]);
for(i=0;i<n;i++)
{
salery[i][3]=salery[i][0]+salery[i][1]-salery[i][2];
sum=sum+salery[i][3];
}
aver=sum/n;

for(i=0; i<n; i++)
{
for(j=0; j<4; j++)
printf("%.2f ",salery[i][j]);
printf("\n");
}
printf("%.2f\n",aver);
return 0;
}``````

``````
#include <stdio.h>
#define N 100
int find(int *, int, int);
int main( )
{
double salery[N][4]; //保存工资的数组
double sum,aver; //保存平均成绩的数组
int i,j,n;
scanf("%d",&n);
for(i=0;i<n;i++)
{
for(j=0;j<4;j++)
{
if(j!=3)
scanf("%lf",&salery[i][j]);
else
salery[i][j] =  salery[i][0]+salery[i][1]-salery[i][2];
}
}
sum = 0;
for(i=0;i<n;i++)
{
sum+=salery[i][3];
}
aver = sum/n;

for(i=0; i<n; i++)
{
for(j=0; j<4; j++)
printf("%.2f ",salery[i][j]);
printf("\n");
}
printf("%.2f\n",aver);
return 0;
}``````