搜索资源列表
DirectInsertSort
- 实现直接插入排序 要求:封装成一个函数,形式如下: void DirectInsertSort(bool bOrder, bool bPrintEveryStep, int * array) 其中,参数bOrder是布尔类型变量,true表示升序,false表示降序 bPrintEveryStep表示是否把每一步的排序结果打印出来,true表示打印,false表示不打印 array是待排序的数组 -direct insertion sorting
time
- class Time { public: Time(int =0,int =0,int =0) void setTime(int,int,int) void printMilitary() void printStandard() private: int hour int minute int second }
delay
- C51精确延时分析探讨 从精度考虑,它得研究结果是: void delay2(unsigned char i) { while(--i) } 为最佳方法。
1-1
- c++二、通过将其元素插入到双向链表中的方法对数组A进行排序。算法对链表的当前操作位置进行维护,当需要插入表项时,若新元素比当前位置值要大,则往前移动;若小则往后移动。编写函数DoubleSort实现上述排序算法。 template <class T> void DoubliSort( T a[], int n)
1-2
- 二、通过将其元素插入到双向链表中的方法对数组A进行排序。算法对链表的当前操作位置进行维护,当需要插入表项时,若新元素比当前位置值要大,则往前移动;若小则往后移动。编写函数DoubleSort实现上述排序算法。 template <class T> void DoubliSort( T a[], int n)
void
- 用于分栏 是一个很基础的VC汇编语言!很实用
1
- 编写一个程序,输出基本数据类型char, short, int, long, float, double和指针类型void *, char *, short *, int *, long *, float *, double *的数据类型的长度。-The preparation of a program, the output of basic data types char, short, int, long, float, double and pointer type void*, cha
CH451
- 很强的ch4541汇编语言!CH451驱动数码管程序 //端口初始化 void port_init(void) { PORTA = 0x00 DDRA = 0x00 PORTB = 0x07 DDRB = 0x07 PORTC = 0x00 DDRC = 0x00 PORTD = 0x00 DDRD = 0x00 } //主函数 void main(void) { port_init()
5
- 非递归的快速排序算法-#include <iostream> #include <stack> #define MAX_SIZE 11 using namespace std typedef int elem typedef std::stack<int> Stack int partition(elem*pData, int low, int high) voi
wendu
- 关于SHT15的时钟输入的编程,以上函数可以实现SCK和DATA总线的各种输入与输出状态。在SHT15的通信中还需要延时函数,设计时采用函数void DelaylIn8(U32 tt)实现软延时。这样就能完成对SHT15通信协议的模拟。-SHT15 the clock input on programming, the above function can be achieved in a variety of SCK and DATA bus input and output. In SHT1
CPP
- 本程序关键点在于函数的声明,在这里函数声明不能省略,如果第三第四行的函数声明:void add(int x,int y) 和void add2(float x,float y) 省略了,则在接下来定义的函数add里面的调用add2:[add2(x,y) ]会提示出错,因为没有声明的情况下,系统不知道调用的add2或者本身的add是 什么意思-The key points of the program lies in the function declaration, functio
bomblabtwo
- * Dr. Evil s Insidious Bomb, Version 1.0 * Copyright 2002, Dr. Evil Incorporated. All rights reserved. * LICENSE: * * Dr. Evil Incorporated (the PERPETRATOR) hereby grants you (the * VICTIM) explicit permission to use this bomb (the BOMB).
142
- 求两个整数的最大公约数和最小公倍数,并编写主函数调用这两个子函数,输出结果,两个整数由键盘输入。-#include<iostream> using namespace std int x(int a,int b) //x为求最大公约数的函数 { int t=0 if(a>b)t=b else t=a for(int i=t i>=1 i--)if(a i==0&&b i==0)break return i
24c02
- 功能说明:I2C器件读写程序 包 括: bit TestAck(void) uchar Read8Bit(void) uchar WriteAdministraterPassWord(void) uchar WriteDoorPassWord(void) -Function Descr iption: I2C device read and write procedures, including: bit TestAck (void) uchar Read
111
- 单片机无线遥控接收模块C程序源码: void main(void) { P2_7=0 //开数码管显示 选通左右侧的数码管 P0=0xc0 //初始显示数字0 while(1){ P1=0xff //P1口设置为输入状态 先全部写1 i=P1 //赋值给临时存贮变量 i=i&0x0f //和0x0f相与 屏蔽高四位,读取无线遥控码 if (i==0x04)//如果是0x04,则代表
danpianjishiyan
- 单片机实验 一、实验内容 1、静态显示一位数码管(本实验为共阳数码管) 2、利用实验箱提供的显示电路,动态显示一行数据(12345678). 二、实验目的 1. 掌握数码管的静态与动态显示。 2. 了解用总线方式控制数 -#include<reg51.h> #define T 100 void delay(int ys) { int i,j for(i=ys i>0 i--) for(j=110
PT2314
- 本产品是一个具有音量控制的IC。 void I2C_start(void) { EA=0 PTDAT=1 PTSCL=1 SomeNOP() PTDAT=0 SomeNOP() PTSCL=0 } static -本产品是一个具有音量控制的IC。 void I2C_start(void) { EA=0 PTDAT=1 PTSCL=1 SomeNOP()
5、译码器实验
- *实 验 名:译码器实验 *实验说明:8个LED灯显示LS138译码器输出的低电平 *连接方式: *注 意: ************************************/ #include <reg51.h> //---定义IO口---// sbit LSA=P2^2; sbit LSB=P2^3; sbit LSC=P2^4; //---声明全局函数---// void Delay10ms(unsigned int c); /******