真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

c語言lsst函數(shù),c語言中的ln函數(shù)

C語言制作成績單

#include stdio.hstruct stud

網(wǎng)站設(shè)計制作過程拒絕使用模板建站;使用PHP+MYSQL原生開發(fā)可交付網(wǎng)站源代碼;符合網(wǎng)站優(yōu)化排名的后臺管理系統(tǒng);網(wǎng)站制作、成都網(wǎng)站制作收費合理;免費進行網(wǎng)站備案等企業(yè)網(wǎng)站建設(shè)一條龍服務(wù).我們是一家持續(xù)穩(wěn)定運營了十載的成都創(chuàng)新互聯(lián)公司網(wǎng)站建設(shè)公司。

{

int num;

char name[20];

float score1, score2, score3, aver;

}; int main(void)

{

int high;

int i, j;

struct stud myClass[10], *pStu = myClass;

struct stud temp; printf("Please input students info:Num Name score1 score2 score3\n");

for (i = 0; i 10; i++)

{

printf("%d:", i + 1);

scanf("%d %s %f %f %f", myClass[i].num, myClass[i].name, myClass[i].score1,

myClass[i].score2, myClass[i].score3);

myClass[i].aver = (myClass[i].score1 + myClass[i].score2 + myClass[i].score3) / 3;

} high = 0;

for (i = 0; i 10; i++)

{

if (myClass[i].aver myClass[high].aver)

{

high = i;

}

} printf("\nThe Highest is %s(%d)\nscore1=%.2f score2=%.2f score3=%.2f aver=%.2f\n",

myClass[high].name, myClass[high].num,

myClass[high].score1, myClass[high].score2, myClass[high].score3, myClass[high].aver); for (i = 0; i 9; i++)

{

for (j = i + 1; j 10; j++)

{

if ((pStu + j)-aver (pStu + i)-aver)

{

temp = *(pStu + j);

*(pStu + j) = *(pStu + i);

*(pStu + i) = temp;

}

}

} printf("\nResult of sort:\n");

printf("Num Name score1 score2 score3 average\n");

for (i=0; i10; i++)

{

printf("%-5d %-20s %-8.2f %-8.2f %-8.2f %-.2f\n", (pStu+i)-num, (pStu+i)-name,

(pStu+i)-score1, (pStu+i)-score2, (pStu+i)-score3, (pStu+i)-aver);

}

return 0;

}

c語言手機通訊錄 重謝

#includestdio.h struct Class {char *cname; //名字char *cphon; //電話號碼char *cuphon; //單位電話char *cmphon; //手機號碼char *cqq; //qq號碼char *cbday; //生日日期struct Class *node; //其余的自己可以加***** }; typedef struct Class Students; //通訊錄結(jié)構(gòu) typedef Students *Ps; Ps TcraseClsSt(Ps lina); // 催的操作Ps CraseClsSt(Ps lina,char *cname,char *cphon,char *cuphon,char *cmphon,char *cqq,char *cbday); //存過程void OutSmary(Ps lina); //輸出結(jié)果 void main() {Ps lina=NULL;lina=TcraseClsSt(lina);if(lina!=NULL) //如果lina為NULL是錯誤內(nèi)存非配失敗{OutSmary(lina);}elseprintf("Error");getch(); } Ps TcraseClsSt(Ps lina) {int Cmd=0;char cname[100];char cphon[100];char cuphon[100];char cmphon[100];char cqq[100];char cbday[100];do{ printf("Please enter a name:");scanf("%s",cname); //提示并輸入數(shù)據(jù)printf("Enter the phone number:");scanf("%s",cphon);printf("Enter the unit telephone:");scanf("%s",cuphon);printf("Enter phone number:");scanf("%s",cmphon);printf("Enter the number qq:");scanf("%s",cqq);printf("Enter your date of birth:");scanf("%s",cbday);lina=CraseClsSt(lina,cname,cphon,cuphon,cmphon,cqq,cbday);//把數(shù)據(jù)存入鏈表 printf("Enter -1 to exit any exit:");scanf("%d",Cmd); } while(Cmd!=-1lina!=NULL);return lina; } Ps CraseClsSt(Ps lina,char *cname,char *cphon,char *cuphon,char *cmphon,char *cqq,char *cbday) //鏈表存入函數(shù) {Ps merory;Ps linb;merory=(Ps)malloc(sizeof(Students));if(!merory){return NULL; //merory為NULL是返回零 NULL}merory-node=NULL;strcpy(merory-cname,cname); //用字符創(chuàng)拷貝函數(shù) 段錯午 在turbo c 編譯器可以通過 gcc可以用別的方法處理strcpy(merory-cphon,cphon);strcpy(merory-cuphon,cuphon);strcpy(merory-cmphon,cmphon);strcpy(merory-cqq,cqq);strcpy(merory-cbday,cbday);if(lina==NULL)return merory; linb=lina; while(linb-node!=NULL)linb=linb-node; linb-node=merory;return lina; } void OutSmary(Ps lina) //鏈表輸出函數(shù) {while(lina!=NULL){printf("name:%s,Phone:%s,Unit Number:%s,Phone number:%s,qq No:%s,Date of Birth:%s\n",lina-cname,lina-cphon,lina-cuphon,lina-cmphon,lina-cqq,lina-cbday);lina=lina-node;} }


網(wǎng)頁題目:c語言lsst函數(shù),c語言中的ln函數(shù)
網(wǎng)站鏈接:http://weahome.cn/article/hoedds.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部