欢迎来到天天文库
浏览记录
ID:61481037
大小:727.00 KB
页数:27页
时间:2021-02-03
《终极第八季修订版.doc》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、71.#include#includestructstu{intno;charname[20];intage;structstu*next;};voidptf(structstu*head){structstu*p2;p2=head;printf("%d",p2->no);p2=p2->next;while(p2->next!=NULL){printf("%d",p2->no);p2=p2->next;}printf("");}intmain(){intn=0,t;structstu*head,*p1,*p2;p
2、1=p2=(structstu*)malloc(sizeof(structstu));do{n++;if(n==1)head=p1;elsep2->next=p1;p2=p1;scanf("%d",&p1->no);if(p1->no==0)break;scanf("%s%d",p1->name,&p1->age);p1=(structstu*)malloc(sizeof(structstu));}while(1);p1->next=NULL;scanf("%d",&t);ptf(head);p2=head;if(p2->no==t)head=p2->n
3、ext;else{while(p2->next!=NULL&&p2->next->no!=t){p2=p2->next;}if(p2->next->no==t)p2->next=p2->next->next;}ptf(head);return0;}72#include#includestructworker{intnum;structworker*next;};structworker*create(intn){inti;structworker*head,*pnew,*pend;pnew=(structworker
4、*)malloc(sizeof(structworker));scanf("%d",&pnew->num);head=pend=pnew;for(i=1;inum);pend->next=pnew;pend=pnew;}pend->next=NULL;returnhead;}voidprint(structworker*head){structworker*p=head;while(p!=NULL){pri
5、ntf("%d",p->num);p=p->next;}}intmain(){structworker*head;intn;scanf("%d",&n);head=create(n);print(head);printf("");return0;}73#include#include#includevoidcheng(chara[],charb[]){ inti,j,ca,cb,*s; ca=strlen(a); cb=strlen(b); s=(int*)malloc(sizeo
6、f(int)*(ca+cb)); for(i=0;i=0;i--) if(s[i]>=10) { s[i-1]+=s[i]/10; s[i]%=10; } i=0;
7、 while(s[i]==0)i++; for(;i8、intf("-"); cheng(a,&b[1]); } else chen
8、intf("-"); cheng(a,&b[1]); } else chen
此文档下载收益归作者所有