- 博客(5)
- 收藏
- 关注
转载 计算Fibonacci数列中 //第一个大于10000的元素及n值。
//Fibonacci数列定义如下: 试编写程序,计算Fibonacci数列中//第一个大于10000的元素及n值。 int Fib(int Num){ if(Num<=2) return 1; return Fib(Num-1)+Fib(Num-2);}void main(){ int n,Num=0; for(n=0;Num<10000;n++) { Num=Fib(n); }...
2018-06-03 19:48:45
6427
转载 线性表的顺序表示——创建 插入 删除 逆置)(C语言完整版)
#include<stdio.h>#include<malloc.h>#include<stdlib.h>#define LIST_INIT_SIZE 100#define LISTINCREMENT 10typedef struct{ int *elem; int length; int listsize;}SqList;SqList InitList(){ ...
2018-06-02 23:24:15
1433
原创 带头节点单链表的插入(元素) 操作(C语言完整版)
#include <stdio.h>#include <malloc.h>#define N 5typedef struct node{ char name[20]; float score; struct node *next;}stud;stud *creat(int n){ stud *p, *h, *s; int i; if((h=(stud*)malloc(siz...
2018-06-01 09:33:28
5171
原创 带头节点单链表的删除(元素) 操作(C语言完整版)
#include <stdio.h>#include <malloc.h>#define N 5typedef struct node{ char name[20]; float score; struct node *next;}stud;stud *creat(int n){ stud *p, *h, *s; int i; if((h=(stud*)malloc(siz...
2018-05-31 19:24:15
8416
转载 带头节点单链表的建立 (C语言完整版)
#include <stdio.h>#include <malloc.h>#define N 10typedef struct node{ char name[20]; struct node *link;}stud;stud *creat(int n){ stud *p, *h, *s; int i; if((h=(stud*)malloc(sizeof(stud)))=...
2018-05-31 10:34:27
9893
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人