随笔分类 -  C语言上机实验

上机指导与习题选解(第2版) 主编:杨路明
摘要:#include #include #define N 10 typedef struct student { int num; float score; struct student *next; }STU; STU *create() { int i; STU *p,*head=NULL,*tail=head; for (i=0;inum,... 阅读全文
posted @ 2008-07-10 14:39 齐心 阅读(4496) 评论(0) 推荐(0)
摘要:#include #include #define N 10 typedef struct student { int num; float score; struct student *next; }STU; STU *create() { int i; STU *p,*head=NULL,*tail=head; for (i=0;inum,... 阅读全文
posted @ 2008-07-09 16:06 齐心 阅读(4788) 评论(0) 推荐(0)
摘要:#include #include #define N 10 typedef struct student { int num; float score; struct student *next; }STU; STU *create() { int i; STU *p,*head=NULL,*tail=head; for (i=0;inum,... 阅读全文
posted @ 2008-07-09 11:27 齐心 阅读(5351) 评论(0) 推荐(0)
摘要:本题没有加入正确日期判断功能 #include struct date { int year; int month; int day; }; int leap_year(int a); int cal_day(struct date a); /*判断闰年*/ int leap_year(int a) { if(a%400==0||(a%4==0&... 阅读全文
posted @ 2008-07-08 16:02 齐心 阅读(22765) 评论(2) 推荐(0)
摘要:#include #include typedef struct node { int data; struct node *next; }NODE; NODE *head=NULL; /*函数声明*/ NODE *createlist_head(int len); NODE *createlist_end(int len); NODE *createlist_so... 阅读全文
posted @ 2008-07-08 14:44 齐心 阅读(669) 评论(0) 推荐(0)
摘要:1、 #include#includevoid main(){ int *a,*b,*c,*min; a=(int *)malloc(sizeof(int)); b=(int *)malloc(sizeof(int)); c=(int *)malloc(sizeof(int)); min=(int *)malloc(sizeof(int)); printf("输... 阅读全文
posted @ 2007-02-15 22:54 齐心 阅读(378) 评论(0) 推荐(0)