交通咨询系统

#include <stdio.h>#include <stdlib.h>#define MVnum 100 //最大顶点数#define Maxint 32767 //定义计算机中的int的最大值 typedef enum {FALSE,TRUE} boolean;typedef struct {//建立图的存储结构 char vexs[MVnum]; //顶点数组 int arcs[MVnum][MVnum]; //邻接矩阵 }MGraph;int D1[MVnum],P1[MVnum];int D[MVnum][MVnum];int P[MVnu...
2011-06-21 12:54 | 阅读 1056 次 | 评论 0 条

学生成绩处理

#include <stdio.h>#include <string.h> typedef struct{ char number[10]; char name[16]; int score[4]; int total; int position;}student;void sr(student st[],int n) //录入信息函数 { int i; for(i = 1;i <= n;i ++) { printf("输入学号 姓名: \n"); scanf("%s %s",st[i].number,st...
2011-06-21 12:53 | 阅读 954 次 | 评论 0 条

二叉树的遍历以及求结点上的路径

#include <stdio.h>#include <stdlib.h>#define num 100 typedef struct node{ char data; struct node *lchild,*rchild;}binTnode;typedef binTnode * binTree;int found;binTnode *p; binTree createBinTree(binTree bt) //二叉树建立函数 { binTnode * q[num]; binTnode *s; int front,rear; char c...
2011-06-21 12:52 | 阅读 1469 次 | 评论 0 条

单词检索与计数

#include <stdio.h>#include <string.h>#include <stdlib.h>#define MAX 256typedef struct{ char ch[MAX]; int length;}SeqString;int main(){ void createTextFile(); //建立文本文件函数 void StrCount(); //单词计数函数 void StrInd(); //检索单词出现在文本文件中的行号、位置以及次数的函数 int partPosit...
2011-06-21 12:50 | 阅读 1006 次 | 评论 0 条
浏览10573次