成績(jī)排名源代碼
大?。?/span>155 人氣: 2010-02-09 需要積分:0
推薦 + 挑錯(cuò) + 收藏(0) + 用戶評(píng)論(0)
標(biāo)簽:源代碼(65730)
成績(jī)排名源代碼#include "stdio.h"
#include "stdlib.h"
#define N 5
void input(char *code[],char *name[],float *score1,float *score2,
float *score3,float *aver,int n);
void output(char *code[],char *name[],float *score1,float *score2,
float *score3,float *aver,int n,int j);
void sort(char *code[],char *name[],float *score1,float *score2,
float *score3, float *aver,int n);
void swap1(float *p1,float *p2);
void swap2(char **p1,char **p2);
main()
{char *code[N],*name[N];
?float score1[N],score2[N],score3[N],aver[N];
?input(code,name,score1,score2,score3,aver,N);
?printf("\n");
?output(code,name,score1,score2,score3,aver,N,1);
?sort(code,name,score1,score2,score3,aver,N);
?printf("\n");
?output(code,name,score1,score2,score3,aver,N,2);
?getch();
}
void input(char *code[],char *name[],float *score1,float *score2,
float *score3,float *aver,int n)
{int i;
?for (i=0;i
?? code[i]=malloc(8);
?? name[i]=malloc(12);
?? scanf("%s%s%f%f%f",code[i],name[i],&score1[i],&score2[i],&score3[i]);
?? aver[i]=(score1[i]+score2[i]+score3[i])/3.0;
?}
?printf("\n");
}
void output(char *code[],char *name[],float *score1,float *score2,
float *score3,float *aver,int n,int j)
{int i;
?printf("????????? school report(%d)????????? \n",j);
?printf("----------------------------------------------------------------\n");
?printf("code??????? name????????? score1? score2?? score3? aver\n");
?printf("----------------------------------------------------------------\n");
?for (i=0;i
? score1[i],score2[i],score3[i],aver[i]);
? }
}
?
非常好我支持^.^
(1) 100%
不好我反對(duì)
(0) 0%
下載地址
成績(jī)排名源代碼下載
相關(guān)電子資料下載
- Makefile簡(jiǎn)介和使用方法 530
- 當(dāng)一名高職生成為開源代碼頂級(jí)貢獻(xiàn)者 111
- git命令的基本使用 357
- 分享一套生產(chǎn)管理MES系統(tǒng)源碼,可以直接拿來搞錢的好項(xiàng)目 140
- C/c++源代碼qt軟件 svn版本管理開發(fā)如何防泄密? 48
- 為什么安秉信息的源代碼防泄密軟件這么穩(wěn)定? 76
- C語言必備知識(shí)編譯預(yù)處理 421
- 非常可靠的c#+svn或git服務(wù)器源代碼防泄密方案 全解析 82
- 極狐GitLab—新一代源代碼管理倉庫 152
- 能夠生成java文檔注釋的命令 140