label
stringlengths
1
2
index
stringlengths
1
5
code
stringlengths
87
8.24k
31
15200
struct stu { char num[100]; char name[100]; char sex[3]; char age[10]; char score[10]; char ad[100]; struct stu*next; struct stu*pre; }; int main(int argc, char* argv[]) { int cal=0,i=0; char end[100]; struct stu*head,*p1,*p2; p1=(struct stu*)malloc(len); scanf(" %s %s %s %s %s %s",p1->num,p1->name,p1->sex...
31
15201
void append() { char str[50]; gets(str); if (str[0] != 'e') { append(); puts(str); } } void main() { append(); }
31
15202
struct w {char id[100]; struct w *next; }; struct w *head,*new,*newhead,*p1,*p2; int i,n; void main() { n=0; head=null; p1=p2=(struct w *)malloc(len); gets(p1->id); while(strcmp(p1->id,"end")!=0) { n++; if(n==1)head=p1; else p2->next=p1; p2=p1; p1=(struct w *)malloc(len); gets(p1->id); } p2->next=null...
31
15203
struct student { char num[20]; char name[20]; char sex; int age; float score; char add[20]; struct student * next; }; struct student * input(void) { struct student *p1,*p2,*head; p1=(struct student *)malloc(len); p1->next=NULL; scanf("%s %s %c %d %f %s",p1->num,p1->name,&p1->sex,&p1->age,&p1->score,p1->add);...
31
15204
struct shuju { char str[100]; struct shuju * next; }; struct shuju *create() { struct shuju *head,*p1,*p2; p1=(struct shuju* )malloc(len); gets(p1->str); p1->next=NULL; while (1) { p2=p1; p1=(struct shuju* )malloc(len); gets(p1->str); if(strcmp(p1->s...
31
15205
struct node { struct node *back; char num[20]; char name[20]; char gender; int age; char score[10]; char address[20]; struct node *next; }; void main() { char end[]="end"; char t[20]; struct node *p,*head; p=(struct node *)malloc(sizeof(struct node)); head=p; head->back=NULL; scanf("%s %s %c %d %s %s",p-...
31
15206
struct s { char a[100]; char b[100]; char c; int d; char e[100]; char f[100]; }k[1000]; int n; int main(int argc, char *argv[]) { int i; for(i=0;;i++) { scanf("%s",k[i].a); if(strcmp(k[i].a,"end")==0) break; scanf(" %s %c %d %s %s",k[i].b,&k[i].c,&k...
31
15207
struct student {char num[1000]; struct student *next; }; void main() {struct student *head,*p1,*p,*p2,*end; int n=0; p=p1=p2=(struct student*)malloc(LEN); gets(p1->num); head=NULL; while(strcmp(p1->num,"end")!=0) {n=n+1; head=p1; if(n==1) p1->next=NULL; else p1->next=p2; p2=p1; p1=(struct student*)malloc(LEN...
31
15208
struct stu { char xinxi[100]; struct stu *down; }; int n=0; struct stu * creat() { struct stu *top=NULL; struct stu *p1=NULL,*p2=NULL; p1=p2=(struct stu *)malloc(LEN); gets(p1->xinxi); while(p1->xinxi[0]!='e') { n++; if(n==1) p1->down=NULL; else p1->down=p2; top=p1; p2=p1;...
31
15209
struct student { char num[20]; char name[100]; char sex; int age; char score[10]; char address[20]; struct student *next; }; struct student *print() { struct student *head=NULL,*node; do { node=(struct student*)malloc(sizeof(struct student)); scanf("%s",node->num); if(strcmp(node->num,"e...
31
15210
int main() { struct student { char s[500]; struct student *next; }stu[2000],stup[2000]; int i=0,j; struct student *p1,*p2,*head; p1=p2=(struct student *)malloc(LEN); head=NULL; gets(p1->s); while((*(p1->s)+0)!='e') { stu[i]=*p1; if(++i==1) head=p1; else p2->next=p1; p2=p1; p1=(struct student *)m...
31
15211
struct stu {char c[100]; struct stu *previous; }; int n; struct stu *creat(void) { struct stu *p,*q; n=0; p=q=(struct stu *)malloc(Len); gets(p->c); for(;strcmp(p->c,"end")!=0;) { n++; if(n==1) p->previous=Null; else { p=(struct stu *)malloc(Len); p->previous=q; q=p; gets(p->c); } } retu...
31
15212
struct Info { char num[10]; char name[20]; char sex; int age; char score[10]; char address[20]; struct Info* next; struct Info* former; }; int main() { struct Info *head,*p1,*p2,*p,*tail; head=(struct Info*)malloc(sizeof(struct Info)); p1=head; p2=head; char temp[10]; scanf("%s %s %c %d %s %s",p2->num,p2-...
31
15213
struct student { char num[20]; char name[20]; char sex; int age; double score; char add[100]; struct student*next; }*head,*p1; void main() { int n=0; p1=(struct student*)malloc(LEN); scanf("%s",p1->num); while(p1->num[0]!='e') { scanf("%s %c%d%lf%s",p1->name,&p1->sex,&p1->age,&p1->score,p1->add); n++; ...
31
15214
struct stu_imformation { char num[16]; char name[20]; char sex; int age; char score[10]; char site[20]; struct stu_imformation *next; }; void main() { struct stu_imformation *head,*p1,*p2; head=(struct stu_imformation *)malloc(LEN); scanf("%s %s %c %d %s %s",head->num,head->name,&head->sex,&head->age,head...
31
15215
struct student { char num[15]; char name[20]; char sex; int age; char score[10]; char add[30]; struct student *next; }; int main() { int n,i; struct student *head,*p1,*p2; n=0; p1=p2=(struct student *)malloc(LEN); p1->next=NULL; scanf("%s ",p1->num); while(strcmp(p1->num,"end")!=0) { n++; scanf("%s %...
31
15216
struct student { char stuID[20]; char name[20]; char sex; int age; char score[10]; char add[20]; struct student*next; }; int main() { struct student *p,*a; char str[10]={"end"}; p=(struct student*)malloc(sizeof(struct student)); scanf("%s",p->stuID); p->next=NULL; while(strcmp(p->stuID,str)!=0) { scanf(...
31
15217
struct stu { char num[20]; char name[20]; char s; int age; char point[10]; char adr[50]; struct stu *p; }; void main() { struct stu *stu1=NULL; int n=sizeof(struct stu); stu1=(struct stu *) malloc(n); struct stu *head=NULL,*curent=NULL; stu1->p=NULL; while(scanf("%s",stu1->num)) { if((strcmp(stu1->num,"...
31
15218
struct student { int age; float score; char name[100],sex,add[20],num[20]; struct student *p; }; void main() { struct student *p1,*head; p1=head=(struct student *) malloc(LEN); p1->p=NULL; scanf("%s %s %c %d %f %s",p1->num,p1->name,&p1->sex,&p1->age,&p1->score,p1->add); while (1) { p1=(struct student *) mal...
31
15219
struct student { char str[1000]; struct student *next; }; int main() { struct student *p,*pnew,*head,*p1; pnew=(struct student *)malloc(sizeof(struct student)); gets(pnew->str); pnew->next=NULL; if(strcmp(pnew->str,"end")==0) { free(pnew); head=NULL; } else { head=pnew; p=pnew; while(1) { pnew=(s...
31
15220
struct student//?? ?? ?? ?? ?? ?? { char num[12]; char name[20]; char sex; int age; float grade; char add[12]; struct student *next; }; int n=1; struct student *build(void) //???? { struct student *pn, *pt; pn=(struct student*)malloc(sizeof(struct student)); scanf("%s",pn->num); pn->next=NULL; while(pn->num...
31
15221
struct student{char xh[20];char name[50];char sex;int age;char gra[10];char adds[50];struct student *next;}; void main() { struct student *pa,*pb; int i; pa=pb=(struct student*)malloc(l); for(i=0; ;i++) { scanf("%s",pa->xh); if(pa->xh[0]=='e') break; scanf("%s %c %d %s %s",pa->name,&pa->sex,&pa->age,pa-...
31
15222
struct student { char num[10]; char name[20]; char sex; int age; char score[10]; char add[20]; struct student *next; }; struct student *creat(void) { struct student *head,*p1,*p2; p1=p2=(struct student *)malloc(LEN); scanf("%s %s %c %d %s %s",p1->num,p1->name,&p1->sex,&p1->age,p1->score,p1->add); head=p1; lo...
31
15223
struct stu { char num[20]; char name[30]; char sex; int age; float score; char add[30]; struct stu *next; }; void main() { int i,len=1; struct stu *p1,*p2,*head,*new,*newhead; p1=p2=head=(struct stu*)malloc(sizeof(struct stu)); printf("\n"); scanf("%s %s %c %d %f %s" ,p1->num,p1...
31
15224
struct student { char a[100]; struct student *next; }; struct student *create() { struct student *p1,*p2; p1=(struct student*)malloc(len); gets(p1->a); p1->next=NULL; p2=p1; for(;;) { p1=(struct student*)malloc(len); gets(p1->a); if(strcmp(p1->a,"end")==0) { free(p1); break; } p1->next=p2...
31
15225
struct student { char num[20]; char name[20]; char sex; int age; char score[20]; char address[20]; struct student*next; }; char t[4]={"end"}; struct student*p1,*p2; struct student * creat(void) //??????? { struct student*head; int n=0; p1=p2=(struct student*)malloc(LEN); scanf("%s", p1->num); while ...
31
15226
struct stu {char num[50]; char name[50]; char sex[1]; int age; char score[50]; char add[50]; struct stu *next; }; int main() {struct stu *head,*p1,*p2; p1=(struct stu*)malloc(LN); scanf("%s",p1->num); scanf("%s",p1->name); scanf("%s",p1->sex); scanf("%d",&p1->age); scanf("%s",p1->score); scanf("%s",...
31
15227
struct student {char information[100]; struct student *next; }; int n; struct student *creat(void) {struct student *head; struct student *p1,*p2; n=0; p1=p2=(struct student *)malloc(LEN); gets(p1->information); while(strcmp(p1->information,"end")!=0) {n=n+1; if(n==1) p1->next=NULL; else {p1->next=p2;p2=p1;} ...
31
15228
main() { struct stu { char num[10]; char name[32]; char sex; int age; float score; char address[32]; struct stu *next; }; struct stu *p1,*p2; p1=(struct stu *)malloc(len); p1->next=NULL; int i; for(i=0;;i++) { scanf("%s",p1->num); if(!strcmp(p1->num,"end")) break; ...
31
15229
struct student { char temp[50]; struct student *previous; }; void main() { struct student *end,*head; struct student *p1,*p2, *p; /*p1=(struct student *)malloc(LEN);*/ p2=head=NULL; while(1) { p1=(struct student*)malloc(LEN); gets(p1->temp); if (strcmp(p1->temp,"end")==0) { /*delete p1;*/ break...
31
15230
void main() { struct li { char num[20],k[1000]; struct li *next,*up; }*head,*p; head=(struct li *)malloc(sizeof(struct li)); p=head; for(;;) { scanf("%s",p->num); if(p->num[0]=='e') break; gets(p->k); p->next=(struct li *)malloc(sizeof(struct li)); (p->next)->up=p; p=p->next; } p=p->up; whi...
31
15231
struct student { char information[100]; struct student *previous; }; void main() { struct student *p1,*p2,*p; p1=z; p1->previous=NULL; gets(p1->information); do{ p2=z;//???p1,p2?????????????? p2->previous=p1; p1=p2; gets(p2->information); } while(strcmp(p1->information,"end")); p1=p1->previous; f...
31
15232
struct student{ struct student * formal; char xuehao[20]; char xingming[20]; char xingbie; int nianling; char defen[20]; char dizhi[30]; struct student * next; }; int n=0; struct student * creat(void); void print(struct student *end); void main() { struct student * enda; enda=creat(); print(enda...
31
15233
// 1209.cpp : Defines the entry point for the console application. // //#include "stdafx.h" struct data { char num[200],name[200],sex,add[200]; int age; char score[200]; struct data *next; }; struct data *creat() { struct data *head,*p1 = NULL,*p2 = NULL; int n=0; do{ p2=p1; p1=(struct data*)malloc(sizeof(...
31
15234
struct q { char a[100]; struct q *last; }; struct q * c() { struct q *p1,*p2,*end; int t=1; while(0==0) { p1=(struct q *)malloc(sizeof(struct q)); gets(p1->a); if(t==1) { p1->last=NULL; p2=p1; t=0; } else { if(p1->a[0]!='e') { p1->last=p2; p2=p1; } else { end=p2; ...
31
15235
int main() { int i,m; char a[501][500]; for(i=0;;i++) { gets(a[i]); if (a[i][0]=='e') { m=i; break; } } for(i=m-1;i>=0;i--) { puts(a[i]); } return 0; }
31
15236
struct student { char a[100]; struct student * next; }*p1,*p2,*head; int main() { int n=0; p1=p2=(struct student *)malloc(Len); gets(p1->a); p2->next=NULL; while(1) { p1=(struct student *)malloc(Len); gets(p1->a); p1->next=p2; if(strcmp(p1->a,"end")==0) { head=p1->next; break; } else { ...
31
15237
struct student { char num[10]; char name[20]; char sex; int age; char score[20]; char address[50]; struct student *next; }; void main() { struct student *head,*p,*q,*t; t=(struct student*)malloc(sizeof(struct student)); t->next=NULL; head=(struct student*)malloc(sizeof(struct student)); head->next=NULL; ...
31
15238
struct stu { char zifu[200]; struct stu *next; }; struct stu stu[1000]; void main() { int i; struct stu *p=stu; for(i=0;i<1000;i++,p++) { gets(p->zifu); char str[10]="end"; if((strcmp(p->zifu,str))==0) break; p->next=(p-1); } p=p-1; stu[0].next=NULL; while(p!=NULL) { puts(p->zifu); p=p->next;...
31
15239
struct student { char num[10]; char name[20]; char sex[2]; int age; char score[30]; char add[30]; struct student *next; }; int main() { struct student *head; struct student *p1,*p2,*p; p2=p=(struct student*)malloc(sizeof(struct student)); scanf("%s%s%s%d%s%s",p2->num,p2->name,p2->sex,&p2->age,p2->score,p2...
31
15240
struct stu { char num[21]; char name[21]; char sex; int age; char score[11]; char addr[21]; struct stu *pre,*next; }head,end; void create() { struct stu *p1,*p2; p2=&head; p1=(struct stu *)malloc(sizeof(struct stu)); scanf("%s",p1->num); while (strcmp(p1->num,"end")!=0) { p2->next=p1; p1->pre=p2; sc...
31
15241
//??????? struct student { char info[50]; struct student *next; }*p1,*p2; int n; //???? struct student *creat (void) { struct student *head; n=0; p1=p2=(struct student*)malloc(LEN); gets(p1->info); head = NULL; while(strcmp(p1->info,"end")) { ...
31
15242
struct student { char number[15]; char name[20]; char gender[3]; int age; float score; char address[30]; struct student *next; }; struct student *creat(void) { int i=1; struct student *head,*p1=(struct student *)malloc(LEN); head=p1; head->next=NULL; scanf("%s%s%s%d%f%s",p1->number,p1->name,p1->gender,&p1->...
31
15243
void main() { char s[1024][128]; int i=0; while(gets(s[i])) { if(strcmp(s[i],"end")==0) break; i++; } while(i!=0) { i--; puts(s[i]); } }
31
15244
struct student{ char num[20]; char name[20]; char sex; int age; float score; char address[20]; struct student *next; }; int n; struct student *create() { struct student *head; struct student *p1,*p2; head=NULL; n=0; p1=p2=(struct student *)malloc(len); scanf("%s",p1->num); if(p1->num[0]=='e') return(...
31
15245
struct student {char num[20]; char name[20]; char sex[2]; int old; float grade; char address[100]; struct student *next; }; int main() { struct student *p1,*p2; p1=p2=NULL; p1=(struct student *)malloc(sizeof(struct student)); scanf("%s",p1->num); if(p1->num[0]=='e') return 0; do { scanf("%s%s%d%f%s",p1->...
31
15246
struct stu {char num[20]; char name[20]; char sex; int age; char score[10]; char adr[20]; struct stu *next; }; int main(){ int n=0; int i; struct stu *head; struct stu *p1,*p2,*re,*rehead; p1=p2=(struct stu *)malloc(len); scanf("%s %s %c %d %s %s",p1->num,p1->name,&p1->sex,&p1->age,p1->score,p1->adr); ...
31
15247
struct student { char num[100]; char name[100]; char sex; int age; float score; char add[100]; struct student *next; }; int n; struct student*input(void) { struct student *head,*p1,*p2; n=0; p1=p2=(struct student*)malloc(LEN); scanf ("%s %s %c %d %f %s",&p1->num,&p1->name,&p1->sex,&p1->age,&p1->score,&p1->ad...
31
15248
struct student { char id[100]; char name[100]; char sex; int age; char score[100]; char adress[100]; struct student *next; struct student *formal; }; int n; int main () { struct student *head,*p1,*p2; n=0; int i=0; p1=p2=(struct student*)malloc(len); head=NULL; while(0==0) { n...
31
15249
struct stu { char xuehao[100]; struct stu*next; }; void main() { int n=0; struct stu *head=NULL,*p1=NULL,*p2=NULL; p1=p2=(struct stu*)malloc(LEN); gets(p1->xuehao); while(strcmp(p1->xuehao,"end")!=0) { n++; if(n==1) { p1->next=NULL; } else p1->next=p2; p2=p1; p1=(st...
31
15250
struct student { char info[50]; struct student *pre; struct student *next; }; void main() { int i=0,n=0; struct student *p,*head,*p0; p=head=(struct student *)malloc(sizeof(struct student)); while(strcmp((gets((*p).info)),"end")!=0) { n+=1; p0=p; p=(*p).next=(struct student *)malloc(sizeof(struct student...
31
15251
struct student { struct student *next; char a[100]; }; int n; struct student *creat() { struct student *p1,*p2,*head; n=0; p1=(struct student *)malloc(sizeof(struct student )); gets(p1->a); p2=p1; head=NULL; while (strcmp(p1->a,"end")!=0) { n=n+1; if(n==1) head=p1; else p2->next=p1; p2=p1; p1=(s...
31
15252
struct student { char num[30]; char name[20]; char a[3]; int age; char score[10]; char add[30]; struct student *next; }; int n; void *malloc(unsigned int size); void main() { int l=0,i=0; struct student *head,*p1,*p2,*newhead,*new1; n=0; p1=p2=(struct student*)malloc(LEN); scanf("%s%s%s%d%s%s",&p1->num,&...
31
15253
int main() { struct student{ char number[20]; char name[20]; char sex; int age; float score; char address[20]; struct student *fomer; struct student *next; }; struct student *head,*p,*wei; int i,j; head=(struct student *)malloc(sizeof(struct student)); p=head; p->fomer=NULL; if (p==NULL) { ...
31
15254
void main() {struct student {char a[100]; struct student *next; } *p1,*p2,*head; int n=0; p1=p2=(struct student *)malloc(sizeof(struct student)); head=NULL; gets(p1->a); while(strcmp(p1->a,"end")) {n++; if(n==1) head=p1; else p2->next=p1; p2=p1; p1=(struct student *)malloc(sizeof(struct student)); gets(p1->a); } p2->n...
31
15255
struct stu {char num[20]; char name[20]; char sex; int age; char score[10]; char add[20]; struct stu *next;}; void main() { struct stu *p1,*p2; int n=0; p1=p2=(struct stu*)malloc(LEN); scanf("%s",p1->num); if(strcmp(p1->num,"end")==0) {n=-1;p2=NULL;} else scanf("%s %c %d %s %s",p1->name,&p1->sex,&p1->age,p...
31
15256
/*°ü?0?8¨?0?6?0?0?0?0?0?7?0?4?0?4?0?5?0?1?0?1?0?7?0?6?0?3?0?4?0?4?0?9?0?4?0?8?0?5?0?6?0?3?0?0?0?2?0?5§?0?7ú?0?8?0?2?0?4?0?3?0?3?0?4?0?5?0?1?0?6?0?4?0?5?0?2 00630018 zhouyan m 20 10.0 28#460 ?0?8?0?1?0?6?0?5?0?8?0?2×?0?6?0?2ó?0?6?0?8"end"?0?5á?0?8?0?3 ?0?1?0?1?0?7?0?3?0?8?0?1?0?6?0?2 ?0?5?0?0?0?8?0?1?0?6?0?5?0?8?0?2?...
31
15257
struct student{ char num[20]; char name[30]; char sex; int age; float score; char adress[30]; struct student *next; struct student *last; }; int n=1; struct student *ANewNode(void) { struct student *head=NULL,*newnode,*thisnode; do { newnode=(struct student *)malloc(sizeo...
31
15258
struct student{ char name[100]; char ind[100]; char sex; int age; float score; char dizhi[100]; struct student *next; };//?? ?? ?? ?? ?? ?? int n; struct student *creat() { struct student *p1,*p2; n=0; p1=(struct student *)malloc(LEN); p2=(struct student *)malloc(LEN); scanf("%s %s %c %d %f %s",&p...
31
15259
struct node { char num[20]; char name[20]; char gender; int age; char score[10]; char addr[20]; struct node *next; struct node *back; }; void main() { char scan[100],constant[]="end"; struct node beginning,*head,*p,*ending,*t; int count=1,i; head=&beginning; beginning.next=NULL; beginning.back=NULL; p=he...
31
15260
struct aa { char data[100]; struct aa* next; }; void print(struct aa* p) { if (p->next!=NULL) print(p->next); cout <<p->data<<endl; } int main() { struct aa *head,*p,*q; int si=sizeof(struct aa); head=(struct aa*)malloc(si); p=head;q=head; char s[100]; while (cin.getline(s,100)) if (strcmp(s,"end")) ...
31
15261
struct student { char stu[100]; }a[10000]; void main() { int i,j; for(i=0;;i++) { gets(a[i].stu); if(a[i].stu[0]=='e') { a[i].stu[0]='\0'; break; } } for(j=i;j>=0;j--) { puts(a[j].stu); } }
31
15262
struct student { char xh[1000]; struct student *next; struct student *last; }; int n; struct student *creat(void) { struct student *head; struct student *p1,*p2; p1=(struct student*)malloc(sizeof(struct student)); p2=p1; gets(p1->xh); head=NULL; p1->last=NULL; for(n=1;strcmp(p1->xh,"end")!=0;n++) { ...
31
15263
struct stu { char ss[10000]; struct stu *next; }; int main() { long int i,j,k,l,m,n; struct stu *p,*p1; p1=p=(struct stu*)malloc(len); p1=null; while (1) { p=(struct stu*)malloc(len); gets(p->ss); p->next=p1; p1=p; if (strcmp(p->ss,...
31
15264
struct student { char xuehao[100]; char name[100]; char s; int age; float score; char add[100]; }; int main() { int i,j,n=0; struct student stu[1000]; for(i=0;i<1000;i++) { scanf("%s",stu[i].xuehao); if(stu[i].xuehao[0]=='e'&&stu[i].xuehao[1]=='n'&&stu[i].xuehao[2]=='d') break; scanf("%s %c %d %f ...
31
15265
struct stu { char a[50]; struct stu* b; }; int main() { struct stu* p1,* p2,stu; p1=p2=&stu; p1->b=NULL; gets(p1->a); for(;;) { if(strcmp(p2->a,"end")==0) break; p2=(struct stu*)malloc(N); gets(p2->a); p2->b=p1; p1=p2; } p2=p2->b; for(;;) { printf("%s",p...
31
15266
struct student { char num[20]; char name[20]; char sex[2]; char age[20]; char score[10]; char add[20]; struct student *next; }*head,*p; void input() { head=NULL; int n=0; do { p=(struct student *)malloc(LEN); scanf("%s",p->num); if(p->num[0]=='e') break; scanf("%s%s%s%s%s",p->name,p->sex,&p->age,&...
31
15267
void main() { struct student{ char a[20]; char b[20]; char c; int d; float e; char f[20]; struct student *next; }; struct student *head,*p1,*p0;int n=0; p1=(struct student*) malloc(LEN); scanf("%s",p1->a); head=p1; p1->next=0; while(strcmp(head->a,"end")!=0) { n++; if(n>1) p1=p0; scanf("%s %c %d %f %s",head->b,&head->c...
31
15268
struct student { char id[20]; char name[30]; char sex; int age; char score[30]; char add[30]; struct student *next; struct student *adv; }; int n; void main() { struct student *p,*q,*head; n=0; p=q=(struct student *)malloc(LEN); scanf("%s %s %c %d %s %s",p->id,p->name,&(*(p)).sex,&(*(p)).age,p->score,p->...
31
15269
struct stu { struct stu *back; char info[number]; struct stu *next; } main() { char infos[number]; char s[]="end"; struct stu *head,*p1,*p2,*tail; gets(infos); p2=(struct stu *)malloc(Len); if (strcmp(infos,s)!=0) { head=p2; p2->back=NULL; strcpy(p2->info,infos); p2->next=NULL; gets(infos); p1=...
31
15270
struct student { char xuehao[200]; char name[300]; char xingbie; char age[20]; char grade[20]; char dizhi[200]; struct student *next; }; int main() { int i; int n=0; struct student *tail; struct student *p1,*p2,*p; tail=NULL; p1=p2=NULL; for(i=1;;) { p1=(struct student*)malloc(LEN); p1->next=p2...
31
15271
void main() { char *juzi[1000]; char **p; p=juzi; *p=(char *)malloc(100*sizeof(char)); gets(*p); while(strcmp(*p,"end")!=0) { p++; *p=(char *)malloc(100*sizeof(char)); gets(*p); } p--; for(;p>=juzi;p--) puts(*p); }
31
15272
struct arr { char num[20]; char name[50]; char sex; int age; float score; char address[50]; struct arr *next; }; int n; struct arr *create(void) { struct arr *head; struct arr *p1,*p2; n=0; p1=p2=(struct arr *)malloc(LEN); scanf("%s %s %c %d %f %s",&p1->num,&p1->name,&p1->sex,&p1->age,&p...
31
15273
struct student { char name[50]; struct student *next; struct student *former; };//???????? void main() { struct student *head1,*head2; struct student *p1,*p2; p1=p2=(struct student*)malloc(LEN); gets(p1->name); p1->next=NULL; //???p1->next??? p1->former=NULL; head1=p1; while(strcmp...
31
15274
struct Student { char num[1000]; char name[1000]; char sex; int age; char score[1000]; char add[1000]; struct Student * next; struct Student * pre; }; int n; struct Student * creat(void) { struct Student * head,* end; struct Student * p1,* p2; n=0; p1=p2=(struct Student *)malloc(LEN); scanf("%s",p1->num); ...
31
15275
struct stu { char data[100]; struct stu *next; }; void main() { struct stu *head; struct stu *p1,*p2; p1=(struct stu *)malloc(LEN); p1->next=NULL; gets(p1->data); while(strcmp(p1->data,"end")) { p2=(struct stu *)malloc(LEN); p2->next=p1; p1=p2; gets(p1->data); } head=p1->next; for(p2=head;p2;p2=p2->next) puts(p2->d...
31
15276
struct student { char num[9]; char name[20]; char sex; int age; char grade[6]; char add[11]; struct student*next; }; int n=0; void main() { struct student *head; struct student *p1,*p2,*temp,*p=NULL; p1=p2=(struct student*)malloc(LEN); scanf("%s",p1->num); scanf("%s %c %d %s %s",p1->name,&p1->sex,&p1->age,p...
31
15277
struct student { char info[100]; struct student *next; }; int n; struct student *creat(void) { struct student *head; struct student *p1,*p2; n=0; p1=p2=(struct student *)malloc(LEN); gets (p1->info); head=NULL; while (strcmp(p1->info,"end")!=0) { n=n+1; if (n==1) head=p1; else p2->next=p1; ...
31
15278
struct student { char str[500]; struct student *next; struct student *before; }; struct student *creat(void) { struct student *head,*p1,*p2; p1=p2=(struct student*)malloc(LEN); gets(p1->str); p1->before=NULL; head=p1; while(strcmp(p1->str,"end")!=0){ p2=p1; p1=(struct student*)malloc(LEN); gets(p1->str);...
31
15279
void main() { int i=0, n=0; char a[500][100]; for(i=0; i<500; i++) { gets(a[i]); //getchar(); if(a[i][0]=='e') break; } n=i-1; for(i=n; i>=0; i--) { printf("%s\n",a[i]); } }
31
15280
struct student { char num[10]; char name[20]; char s; int age; char score[20]; char address[30]; struct student *next; }; int main() { struct student *p1,*p2; p1=(struct student *)malloc(LEN); p1->next=0; scanf("%s %s %c %d %s %s",p1->num,p1->name,&p1->s,&p1->age,&p1->score,p1->address); while(1) { p2...
31
15281
void main() { struct student { char num[10],name[20],sex,add[15]; int age; float mark; struct student * next; struct student * before; }; struct student *s1=(struct student *)malloc(sizeof(struct student)),*head=s1,*s2; (*s1).before=0; while(1) { scanf("%s",(*s1).num); if((*s1).num[0]!='e') { ...
31
15282
struct student { char num[100]; char nam[100]; char sex[2]; char age[100]; char sco[100]; char add[100]; struct student *prev; struct student *next; }; struct student *create(void) { struct student *head,*end,*p1,*p2; int n=0; p1=p2=(struct student*)malloc(LEN); scanf("%s",p1->num); while(strcmp(p1->num,...
31
15283
struct Student { char num[10]; char name[25]; char sex; int age; float score; char add[15]; struct Student *next; }; int main() { struct Student *creat(void); struct Student *head,*p; head=creat(); p=head; while(p->next!=NULL) { printf("%s %s %c %d %g %s\n",p->num,p->name,p->sex,p->age,p->score,p->add); ...
31
15284
struct student { char num[200]; char name[200]; char sex; int age; float score; char address[200]; struct student *next; }; int num; struct student *creat(void) { struct student *head; struct student *p1,*p2; head=NULL; num=0; while(1) { p1=(struct student *)malloc(LEN); scanf("%s",p1->num); if (strc...
31
15285
struct Student { char num[41]; char name[41]; char gender[5]; int age; char score[10]; char address[41]; struct Student * next; struct Student * pre; }; int size=sizeof(struct Student); struct Student gan; void push () { char ster[41];struct Student * pt; scanf("%s",ster); ...
31
15286
struct student {char num[20]; char name[20]; char sex; int age; char score[20]; char addr[30]; struct student *next; }; int n; struct student *creat(void) { struct student *end,*p1,*p2; n=0; p1=p2=(struct student *)malloc(LEN); scanf("%s %s %c %d %s %s",&p1->num,p1->name,&p1->sex,&p1->age,&p1->score,p1->addr...
31
15287
struct num { char content[50]; struct num *next; }; struct num *crea() { long i; struct num *head; struct num *p1,*p2; p1=p2=(struct num *)malloc(LEN); head=p1; gets(p1->content); head->next=NULL; for(;;) { p1=(struct num *)malloc(LEN); gets(p1->content); if(p1->content[0]!='e') { p1->next=p2...
31
15288
struct student { char seq[10]; char other[100]; struct student *next; struct student *previous; }; void main() { struct student *p1,*p2; int n=1; p1=p2=(struct student *)malloc(LEN); while(n++) { scanf("%s",p1->seq); if (strcmp(p1->seq,"end")==0) break; gets(p1->other); if (n>1) p1->previous=p2; ...
31
15289
struct node { char data[10][20]; struct node *pre; }; int main () { int i,j; struct node *p1,*p2; p1=(struct node *)malloc(sizeof(struct node)); for (i=1;i<=6;i++) cin>>(*p1).data[i]; p1->pre=NULL; while((*p1).data[1][0]!='e') { p2=(struct node *)malloc(sizeof(struct node)); p2->pre=p1; for (i=1;i<=6;i++) cin>>(*p2).da...
31
15290
struct student { char num[100]; char name[100]; char sex; int age; float score; char ad[100]; struct student *next; struct student *former; }; int n=1; struct student *creat() { struct student *thisnode,*newnode,*head; do { newnode=(struct student *)malloc(sizeof(struct student)); scanf("%s",newnode->num);...
31
15291
struct record { char stuinfo[50]; struct record *pnext; }; int main() { record *stu,*head,*ptemp; head=(struct record*)malloc(sizeof(struct record)); head->pnext=NULL; ptemp=(struct record*)malloc(sizeof(struct record)); stu= (struct record*)malloc(sizeof(struct record)); gets(stu->stuinfo); while(strcmp(s...
31
15292
struct student { char a[80]; struct student *pro; }; struct student *creat() { struct student *end,*p1,*p2; p2=(struct student *)malloc(sizeof(struct student)); gets(p2->a); p2->pro=NULL; p1=p2; do { p2=(struct student *)malloc(sizeof(struct student)); gets(p2->a); if (strcmp(p2->a,"end")==0) { f...
31
15293
struct student { char ID[10]; char name[20],s; int age; char score[10]; char ad[20]; struct student *next; }; int main() { struct student *head; int n,i,j; n=0; head = NULL; struct student *p1 ; while (1) { ...
31
15294
struct student { char num[20]; char name[20]; char sex; int age; char mark[20]; char add[20]; struct student *next; }; void main() { struct student *creat(void); struct student *p; int m=0; p=creat(); while(p!=NULL) { printf("%s %s %c %d %s %s\n",(*p).num,(*p).name,(*p).sex,(*p).age,(*p).mark,(*p).add); ...
31
15295
//struct student struct student { char content[50]; struct student *next; }; int main() { struct student *head,*p1,*p2,*p3,*h,*p4,*p5,*p6; int i,j,k; char s[16]; s[0]='e'; s[1]='n'; s[2]='d'; s[3]='\0'; int m=0; p6=p4=p5=p3=p1=p2=(struct student *)malloc(sizeof(struct studen...
31
15296
struct student { char number[20]; char name[20]; char sex; int age; float score; char address[20]; struct student *next; } main() { int i,j,m,n=0; struct student *head,*p1,*p2,*p; p1=p2=(struct student *)malloc(LEN); for(i=0;;i++) { scanf("%s",p1->number); if(strcmp(p1->number,"end")==0) { break;...
31
15297
struct student { char num[30]; char name[30]; char s[2]; int age; float score; char add[30]; struct student *next; }; struct student *creat() { int n=0; struct student *head; struct student *p1; struct student *p2; p1=p2=(struct student...
31
15298
void main() { char s[1000][100]; int i; for(i=0;;i++) { gets(s[i]); if(s[i][0]=='e') { i--; break; } } for(;i>=0;i--) printf("%s\n",s[i]); }
31
15299
struct student { char num[10]; char name[20]; char sex[5]; char age[5]; char score[10]; char adr[20]; struct student *next; }; struct student *creat(void) { struct student *head; struct student *p1; head=p1=( struct student * ) malloc(LEN); scanf("%s%s%s%s%s%s",p1->num,p1->name,p1->sex,p1->age,&p1->score,...