- 博客(10)
- 收藏
- 关注
转载 和角公式
常用的诱导公式有以下几组: 1.sinα^2 + cosα^2=1 2.sinα/cosα=tanα 3.tanα=1/cotα 公式一: 设α为任意角,终边相同的角的同一三角函数的值相等: sin(2kπ+α)=sinα cos(2kπ+α)=cosα tan(2kπ+α)=tanα cot(2kπ+α)=cotα 公式二: 设α为任意角,π+α的三角...
2019-07-10 16:47:27 4121
原创 希尔排序(C语言)
#include <stdio.h>#include <stdlib.h>int n;/* *希尔排序 */void ShellSort(int *array){ int k = n/2; while(k > 0){ int i,j; for(i=k+1;i<=n;i++){ ...
2019-07-09 11:23:02 72
原创 直接插入排序(C语言)
#include <stdio.h>#include <stdlib.h>int n;/* *直接插入排序 */void InsertSort(int *array){ int i,j; for(i=2;i<=n;i++){ if(array[i] < array[i-1]){ arr...
2019-07-09 10:38:43 108
原创 二分查找(C语言)
#include <stdio.h>#include <stdlib.h>int BinarySearch(int *array,int key,int low,int high){ int mid; while(low<=high){ mid = (low + high)/2; if(key == arra...
2019-07-09 10:37:16 156
原创 二叉树的表示与实现(C语言)
#include <stdio.h>#include <stdlib.h>#define TRUE 1#define FALSE 0#define OVERFLOW -2#define OK 1#define ERROR 0typedef int Status;typedef int TElemType;/* * 链式存储结构代码 *存储结构 ...
2019-07-08 17:18:11 814
原创 队列的表示与实现(c语言)
#include <stdio.h>#include <stdlib.h>#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define OVERFLOW -2typedef int QElemType;typedef int Status;/* *存储结构 */typedef s...
2019-07-03 16:52:00 835
原创 栈的表示与实现(c语言)
#include <stdio.h>#include<stdlib.h>#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define OVERFLOW -2#define INIT_SIZE 20#define INCREMENT_SIZE 5typedef int SElemType;...
2019-07-03 15:34:03 579
原创 线性表顺序表表示与实现(c语言)
#include<stdio.h>#include<stdlib.h>#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INIT_SIZE 10 //初始化表长#define INCREAMENT_SIZE 5 //分配增量typedef int Stat...
2019-07-03 11:23:28 931 2
原创 线性表单链表表示与实现(c语言)
#include <stdio.h>#include<stdlib.h>//单链表的实现#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define OVERFLOW -2typedef int Elemtype;typedef int Status;/* *存储结构 */ty...
2019-07-03 11:20:46 493
原创 linux中gcc编译
linux中gcc编译器一、引用了库函数,要引用头文件,编译时需手动加入函数库链接如:sqrt1,引用头文件#include <math.h>2,linux gcc编译时,如果用到了math中的函数,要手工加入函数库链接:-lm,即:gcc -o test test.c -lm...
2019-07-01 09:30:24 151
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人