
C语言
lxslx
萌新程序员
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
单链表实现学生成绩从高到低排序(C语言)
#include"stdio.h" #include"stdlib.h" #include"string.h" typedef struct student { int score;//学生成绩 struct student *next; }student; student *input(student *stu);//输入成绩 voi原创 2016-09-09 09:59:26 · 19701 阅读 · 1 评论 -
简单结构体的应用(商品排序C语言)
#include"stdio.h" #include"stdlib.h" #include"malloc.h" #include"string.h" typedef struct { char dm[4]; char mc[10]; int dj; int sl; long int je; }product; product *sortDat(product *原创 2016-09-09 10:01:20 · 1892 阅读 · 0 评论 -
文件复制(c语言)
#include"stdio.h" #include"stdlib.h" #include"string.h" int main() { FILE *fp,*fq; fp=fopen("C:\\Users\\ygxnzm17\\Desktop\\text2.txt","rb+"); if(fp==NULL) {原创 2016-09-12 10:07:59 · 488 阅读 · 0 评论 -
单链表(c语言)
#include"stdio.h" #include"stdlib.h" #include"string.h" #define NUM 4 typedef struct LNode { int data; struct LNode *next; }LNode; void CreateList(LNode *&L);//构建单链表 void DestoryLi原创 2016-09-12 11:36:56 · 356 阅读 · 0 评论 -
计算sinx=x-x^3/3!+x^5/5!-x^7/7!+.........
/* 计算sinx=x-x^3/3!+x^5/5!-x^7/7!+......... */ #include"stdio.h" #include"stdlib.h" #include"string.h" #include"math.h" int main() { float sum,t; int i,x; printf("请输入x:\n");原创 2016-09-13 08:55:36 · 19146 阅读 · 1 评论 -
计算π/2=2/1*2/3*4/3*4/5*6/5*6/7.......
/* 计算π/2=2/1*2/3*4/3*4/5*6/5*6/7....... */ #include"stdio.h" #include"stdlib.h" #include"math.h" int main() { int n; float f,sum=1; for(n=2;n { f=(float)(n*n)/((n-原创 2016-09-13 09:07:13 · 20753 阅读 · 3 评论 -
顺序表
#include"stdio.h" #include"stdlib.h" #include"string.h" #define MaxSize 100 typedef struct { int data[MaxSize]; int length; }Sqlist; void createSqlist(Sqlist &L);//构建顺序表 voi原创 2016-09-13 10:31:44 · 313 阅读 · 0 评论 -
二叉树的构建,遍历等基本操作
#include"stdio.h" #include"stdlib.h" #include"string.h" typedef struct BTNode { char data; struct BTNode *lchild,*rchild; }BTNode; void CreateBTNode(BTNode *&T);//构建二叉树 void P原创 2016-09-16 08:53:26 · 2064 阅读 · 0 评论 -
二叉排序树的操作(C语言)
#include"stdio.h" #include"stdlib.h" #include"string.h" #define NUM 5 typedef struct BTNode { int key; struct BTNode *lchild,*rchild; }BTNode; void BTInsert(BTNode *&T,int ke原创 2016-09-19 09:33:57 · 2227 阅读 · 2 评论