随笔分类 -  C

摘要:#include<stdio.h>#include<stdlib.h>typedef int ElemType;typedef struct Lnode{ ElemType data; struct Lnode *next;}Lnode,*LinkList;void CreateList(LinkList &l);//创建void ShowList(LinkList &l);//输出链表int CountList(LinkList &l);//计算结点数int CountNodeAdd(LinkList &l);//计算元素和int Co 阅读全文
posted @ 2011-12-15 17:13 rui_gao 阅读(229) 评论(1) 推荐(0)
摘要:#include<stdio.h>#include<stdlib.h>#include<conio.h>#include<time.h>#include<math.h>int aa[8][8]={0},b[6]={0};void Produce()//随机产生{ int i,j,h=1; srand(time(NULL)); for(i=1;i<6;i++) for(j=1;j<7;j++) { aa[i][j]=1+rand()%6; b[aa[i][j]-1]++; } f... 阅读全文
posted @ 2011-12-03 20:08 rui_gao 阅读(513) 评论(0) 推荐(0)
摘要:1 #include<stdio.h>//TXT 文档见文件末 2 #include<stdlib.h> 3 #include<string.h> 4 #include<conio.h> 5 #define N 1000 6 typedef struct Word 7 { 8 char English[20]; 9 char Chinese[60]; 10 }word; 11 void Search(word s[],int num,char *d);//查找 12 void Revise(word s[],int *num,char *d); 阅读全文
posted @ 2011-11-19 17:25 rui_gao 阅读(1088) 评论(3) 推荐(0)
摘要:#include<stdio.h>#include<stdlib.h>#include<conio.h>#include<time.h>int a[25],sum=0,flag=0,i=0,j;void Menu()//菜单{ puts("********************"); puts("* 1 3x3 *"); puts("* 2 4x4 *"); puts("* 3 5x5 *"); puts("* 4 退出 *"); puts(&q 阅读全文
posted @ 2011-10-26 21:08 rui_gao 阅读(292) 评论(0) 推荐(0)
摘要:/*拼成后不能顺利退出 (有谁感兴趣拼成后说下结果)*/#include<stdio.h>#include<stdlib.h>#include<conio.h>#include<time.h>int main(){ int a[25],b,n,k,i=0,j,temp,h,y,flag,sum=0; char f; puts("********************"); puts("* 1 3x3 *"); puts("* 2 4x4 *"); puts("* 3 ... 阅读全文
posted @ 2011-10-21 12:41 rui_gao 阅读(273) 评论(0) 推荐(0)
摘要:1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<conio.h> 4 #include<time.h> 5 struct point 6 { 7 int row; 8 int col; 9 }; 10 struct snake 11 { 12 struct point body[100]; 13 int length; 14 }; 15 struct food 16 { 17 struct point f; 18 }; 19 void main() 20 { 21 int i,... 阅读全文
posted @ 2011-10-20 19:21 rui_gao 阅读(185) 评论(0) 推荐(0)
摘要:#include#includestruct student{ int nomber; char name[10]; float yuwen; float shuxue; float tiyu; float sum;};void paixu(struct student stu[]);void nopass(struct student a[]);void main(){ struct student stu[4]; int i,a; char c,d; printf("输入学生信息:\n"); printf("学号 姓名 语文 数学 体育\n"); f 阅读全文
posted @ 2011-09-12 22:56 rui_gao 阅读(417) 评论(0) 推荐(1)