摘要:
1 #include 2 #define LEN sizeof(struct Student) 3 struct Student 4 { 5 int num; 6 float score; 7 struct Student *next; 8 }; 9 int n=0;10 struct Student *creat()11 {12 struct Student *p1,*p2,*head;13 p1=p2=(struct Student *)malloc(LEN);14 head=NULL;15 printf("请输入学生的学号和成绩,... 阅读全文
posted @ 2013-11-21 23:36
ASMLearner
阅读(282)
评论(0)
推荐(0)
摘要:
1 #include 2 struct Student 3 { 4 int num; 5 float score; 6 struct Student *next; 7 }; 8 int main() 9 {10 struct Student a,b,c,*head,*p;11 a.num=10101;a.score=89.5;12 b.num=10103;b.score=90;13 c.num=10107;c.score=85;14 head=&a;15 a.next=&b;16 b.next=&c;17 ... 阅读全文
posted @ 2013-11-21 20:46
ASMLearner
阅读(264)
评论(0)
推荐(0)
摘要:
1 /*有n个学生的信息(包括学号、姓名、成绩),要求按照成绩的高低顺序输出各学生的信息。*/ 2 #include 3 struct student 4 { 5 int number; 6 char name[20]; 7 int score; 8 }; 9 int main(void)10 { struct student stu[5]={001,"wang",80,002,"zhang",89,003,"wang",60,004,"zhao",97,005,"sun",100};11 st 阅读全文
posted @ 2013-11-21 01:45
ASMLearner
阅读(5556)
评论(0)
推荐(0)
摘要:
1 #include 2 struct leader 3 { 4 char name[20]; 5 int count; 6 }lead[]={"li",0,"wang",0,"zhao",0}; 7 void main(void) 8 { 9 int i,j; char lead1[20];10 printf("Please input the name with \"li\" and \"wang\" or \"zhao\"\n");11 for(i= 阅读全文
posted @ 2013-11-21 00:25
ASMLearner
阅读(451)
评论(0)
推荐(0)
浙公网安备 33010602011771号