急求一道程式設計題答案

時間 2021-05-09 17:27:35

1樓:匿名使用者

#include

#include

struct student {

char name[50];

char ***y[10];

int no;

int chinese;

int english;

int math;

int totalscore

void sortinfo(struct student*arr,int n)

struct student temp;

int i;int j;

for(i=0;ifor(j=i;jif(arr[j].totalscoretemp=arr[j];

arr[j]=arr[j+1];

arr[j+1]=temp;

if(arr[j].totalscore==arr[j].totalscore)

if(arr[j].no>arr[j].no)

temp=arr[j];

arr[j]=arr[j+1];

arr[j+1]=temp;

void show(struct student *p,int size)

int i;

for(i=0;iprintf("%s\t",p[i].name);

printf("%d\t",p[i].no);

printf("%d\t",p[i].totalscore);

printf("\n");

int main()

{   int a;

printf("how many people do you want to put up with:");

scanf("%d",&a);

struct  student b[a];

int i;

for(i=0;i{   char ch;

printf("please input the name:");

scanf("%s",b[i].name);

printf("please input the ***y(girl or boy):");

scanf("%s",b[i].***y);

printf("please input the no:");

scanf("%d",&b[i].no);

printf("please input tht chinese score:");

scanf("%d",&b[i].chinese);

printf("please input the english score:");

scanf("%d",&b[i].english);

printf("please input the math score:");

scanf("%d",&b[i].math);

b[i].totalscore=b[i].chinese+b[i].english+b[i].math;

sortinfo(b,a);

show(b,a);

return 0;

2樓:匿名使用者

for(int x=n;x>=0,x--) }

}理清思路了麼?

3樓:匿名使用者

情人節, 需要批發**花和巧克力的低價批發

一道數學題,急求答案,一道數學題,急求答案

暮秋之殤 由題知走了10天,設雨天有x天 則有 12x 17 10 x 160 解之得 x 2 設軍訓期間雨天有x 天,晴天有y天,則 12x 17y 160 x y 160 16 10 x 2,y 8 軍訓期間雨天有2天. 維 他命 設雨天為x,軍訓進行了160 16 天 10天 則晴天 10 x...

急求!一道VB程式設計題謝謝,10道VB題 急求答案!!!謝謝高手了

private sub procmin a as integer,byval amin as integer dim i amin0 for i lbound a to ubound a print a i amin0 a lbound a if a i amin0 then amin a i ne...

急求!一道C語言程式設計題答案,實在不會,拜託親們幫幫忙

解題思路 1元為100分,兌換5分硬幣最多隻能為20個,兌換2分的最多50個,兌換1分的可以通過100 i 5 j 2計算得到。具體演算法如下 vc 6.0測試過,turbo c演算法一樣 include int main printf count d n count 輸出總的方法次數 青青牆外草 ...