#include
void main() { FILE *fp; int s[4],x[4],i; char buffer[256],buf[40];
for ( i=0;i<4;i++ ) s[i]=0;
if ( fp=fopen("c:\\data\\誉裤data.txt","r") ) {
fgets(buffer,255,fp); //读第1行
while ( !feof(fp) ) {
fgets(buffer,255,fp); sscanf(buffer,"%s%s%s%d%d%d%d",buf,buf,buf,&x[0],&x[1],&x[2],&x[3]);
for ( i=0;i<4;i++ ) s[i]+=x[i];
}
fclose(fp);
for ( i=0;i<4;i++ ) printf("%d ",s[i]); printf("\n");
} else printf("无法打拍脊开文档读取数据。\n"袭虚渗);
}