第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

代碼問題請指正?剛學(xué)習(xí)c++,功能不能實現(xiàn)?

代碼問題請指正?剛學(xué)習(xí)c++,功能不能實現(xiàn)?

C++
慕粉2228511008 2017-06-04 16:12:20
#include<stdio.h>struct student//xueheng{??char name[20];??int age;??int num;??float score[6];};??struct student a[5] ;??? int i,j,k;void shuru(){?? ?for(j=0;j<5;j++) //非你別輸入5個學(xué)生年齡?{??scanf("%s",a[j].name);??scanf("%d",&a[j].age);??scanf("%d",&a[j].num);??for(i=0;i<4;i++)??scanf("%f",&a[j].score[i]);//4學(xué)生成績門課?}? k=1;?scanf("%d",&k);}void zongfen(){?for(j=0;j<5;j++)?{??a[j].score[4]=a[j].score[0]+a[j].score[1]+a[j].score[2]+a[j].score[3];??????? a[j].score[5]=a[j].score[4]/4.0;//求平均分?}?k=2;}?void paixu()?{??k=3;???? for(j=1;j<5;j++)???for(i=0;i<=4-j;i++)???{????if(a[i].score[4]>a[i+1].score[4])//非別比較5個學(xué)生4門可總成績大小排序????{?????struct student temp;?????temp =a[i];?????a[i] =a[i+1];?????a[i+1] = temp;????}???}?}void shuchu(){? k=4;??? for(j=0;j<5;j++)?{??printf(" %s",a[j].name);??printf(" %d",a[j].age);??printf(" %d",a[j].num);??for(i=0;i<6;i++)???printf(" %.1f",a[j].score[i]);??????????? printf("\n");??}}void main(){int k;do{printf("----1輸入------\n");printf("----2總分------\n");printf("----3排序------\n");printf("----4輸出-----\n");printf("請輸入你的選擇");scanf("%d",&k);switch(k){?case 1:? if(k==1)?{?????? shuru();???????? break;???? }?case 2:??? if(k==2)?????? zongfen();?????? ?else if(k==1)?????? shuru(); ?else??break;?case 3:??? if(k==3)????? paixu(); ?else if(k=2)?? zongfen();?else if(k==1)?????? shuru(); ?else??break;?case 4:??? if(k==4)?????? shuchu();?else if(k==3)????? paixu(); ?else if(k=2)?? zongfen();?else if(k==1)?????? shuru(); ?else??break;??? }}while(k!=5);}#include<stdio.h>struct student//xueheng{??char name[20];??int age;??int num;??float score[6];};??struct student a[5] ;??? int i,j,k;void shuru(){?? ?for(j=0;j<5;j++) //非你別輸入5個學(xué)生年齡?{??scanf("%s",a[j].name);??scanf("%d",&a[j].age);??scanf("%d",&a[j].num);??for(i=0;i<4;i++)??scanf("%f",&a[j].score[i]);//4學(xué)生成績門課?}? k=1;?scanf("%d",&k);}void zongfen(){?for(j=0;j<5;j++)?{??a[j].score[4]=a[j].score[0]+a[j].score[1]+a[j].score[2]+a[j].score[3];??????? a[j].score[5]=a[j].score[4]/4.0;//求平均分?}?k=2;}?void paixu()?{??k=3;???? for(j=1;j<5;j++)???for(i=0;i<=4-j;i++)???{????if(a[i].score[4]>a[i+1].score[4])//非別比較5個學(xué)生4門可總成績大小排序????{?????struct student temp;?????temp =a[i];?????a[i] =a[i+1];?????a[i+1] = temp;????}???}?}void shuchu(){? k=4;??? for(j=0;j<5;j++)?{??printf(" %s",a[j].name);??printf(" %d",a[j].age);??printf(" %d",a[j].num);??for(i=0;i<6;i++)???printf(" %.1f",a[j].score[i]);??????????? printf("\n");??}}void main(){int k;do{printf("----1輸入------\n");printf("----2總分------\n");printf("----3排序------\n");printf("----4輸出-----\n");printf("請輸入你的選擇");scanf("%d",&k);switch(k){?case 1:? if(k==1)?{?????? shuru();???????? break;???? }?case 2:??? if(k==2)?????? zongfen();?????? ?else if(k==1)?????? shuru(); ?else??break;?case 3:??? if(k==3)????? paixu(); ?else if(k=2)?? zongfen();?else if(k==1)?????? shuru(); ?else??break;?case 4:??? if(k==4)?????? shuchu();?else if(k==3)????? paixu(); ?else if(k=2)?? zongfen();?else if(k==1)?????? shuru(); ?else??break;??? }}while(k!=5);}#include<stdio.h>struct student//xueheng{??char name[20];??int age;??int num;??float score[6];};??struct student a[5] ;??? int i,j,k;void shuru(){?? ?for(j=0;j<5;j++) //非你別輸入5個學(xué)生年齡?{??scanf("%s",a[j].name);??scanf("%d",&a[j].age);??scanf("%d",&a[j].num);??for(i=0;i<4;i++)??scanf("%f",&a[j].score[i]);//4學(xué)生成績門課?}? k=1;?scanf("%d",&k);}void zongfen(){?for(j=0;j<5;j++)?{??a[j].score[4]=a[j].score[0]+a[j].score[1]+a[j].score[2]+a[j].score[3];??????? a[j].score[5]=a[j].score[4]/4.0;//求平均分?}?k=2;}?void paixu()?{??k=3;???? for(j=1;j<5;j++)???for(i=0;i<=4-j;i++)???{????if(a[i].score[4]>a[i+1].score[4])//非別比較5個學(xué)生4門可總成績大小排序????{?????struct student temp;?????temp =a[i];?????a[i] =a[i+1];?????a[i+1] = temp;????}???}?}void shuchu(){? k=4;??? for(j=0;j<5;j++)?{??printf(" %s",a[j].name);??printf(" %d",a[j].age);??printf(" %d",a[j].num);??for(i=0;i<6;i++)???printf(" %.1f",a[j].score[i]);??????????? printf("\n");??}}void main(){int k;do{printf("----1輸入------\n");printf("----2總分------\n");printf("----3排序------\n");printf("----4輸出-----\n");printf("請輸入你的選擇");scanf("%d",&k);switch(k){?case 1:? if(k==1)?{?????? shuru();???????? break;???? }?case 2:??? if(k==2)?????? zongfen();?????? ?else if(k==1)?????? shuru(); ?else??break;?case 3:??? if(k==3)????? paixu(); ?else if(k=2)?? zongfen();?else if(k==1)?????? shuru(); ?else??break;?case 4:??? if(k==4)?????? shuchu();?else if(k==3)????? paixu(); ?else if(k=2)?? zongfen();?else if(k==1)?????? shuru(); ?else??break;??? }}while(k!=5);}
查看完整描述

目前暫無任何回答

  • 0 回答
  • 0 關(guān)注
  • 1261 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號