09 2021 档案
摘要:#include <stdio.h> #include <math.h> //PI/4=1-1/3+1/5-1/7+1/9-1/11+..... int main() { float pi,i,a=1; for(i=1;i<=20000;i=i+2) { if(fabs((1.0/i*pow((-1
阅读全文
摘要:#include <stdio.h> //多分支结构中的default可以放在花括号中任意位置 main() { int a; scanf("%d",&a); switch(a) { default:printf("no"); case 1:printf("a");break; case 2:pri
阅读全文
摘要:#include <stdio.h> int main() { int a,b,c,d; a=0,b=0,c=0; d=c++ || a++ && b++; printf("%d,%d,%d,%d",a,b,c,d); getchar(); } #include <stdio.h> int main
阅读全文
摘要:#include <stdio.h> //从大到小排序 void swap(int *a,int *b) { int tmp = *a; *a = *b; *b = tmp; } int main() { int a,b,c; scanf("%d,%d,%d",&a,&b,&c); if(a<b)
阅读全文
摘要:#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <windows.h> #define N 100 void del_char(char a[],char c)//删除字符串中
阅读全文
摘要:char s[MAX] ={0}; //´æ·ÅÔ´×Ö´® char s1[MAX]={0}; //´æ·Å×Ó×Ö´® char s2[MAX]={0}; //´æ·ÅÌæ»»×Ö´® char result_a[2000] = {0};//´æ·
阅读全文
摘要:#include <stdio.h> //a查找范围 b查找目标 int fun(char *a,char *b) { int n=0; while(*a) { if(*a==*b) n++; a++; } return n; } int main() { char zf[]="我喜欢我我我我C语言
阅读全文
摘要:#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <windows.h> #define N 100 int cishu(char *a,char *b) { int n=0;
阅读全文
摘要:#include <stdio.h> #include <stdlib.h> #include <string.h> #include <glib.h> gchar getpychar(guchar uword0 , guchar uword1) { gchar pychar; int i1 = (
阅读全文
摘要:#include <stdio.h> //printf()函数在计算的时候顺序是从右往左的,但最后输出的顺序是从左往右的 int main() { int a=7,b=6; printf("%d,%d\n",a=8,a==7); printf("%d %d %d",printf("ab"),prin
阅读全文
摘要:***************************************************************************************** STC系列单片机内部AD的应用,和AVR作比较,好理解点 *******************************
阅读全文
摘要:单片机中的外部中断低电平触发和下降沿触发区别为:触发条件不同、触发次数不同、退出不同。 一、触发条件不同 1、外部中断低电平触发:外部中断低电平触发是检测到引脚为低电平就触发,从而进入中断函数中处理这个中断。 2、下降沿触发:下降沿触发是检测到信号有下降沿时的开关动作就触发,从而进入中断函数中处理这
阅读全文
摘要:电路图如上图,表明P0.0-P0.7 P2.0-2.7具有采集功能,而P1.0-1.7则没有采集功能 P0.0-0.7 1.0-1.7 2.0-2.7 3.0-3.7都可以向外发送控制信息
阅读全文
摘要:51单片机写西门子4442IC卡的读卡、写卡程序哦!!! RST BIT P1.2 SDA BIT P1.0SCL BIT P1.1 ORG 0000HAJMP MAINORG 0100H MAIN: ACALL RESTIC2 ACALL READ_SAFE AJMP $ ACALL WRITE_
阅读全文
摘要:#include <io8535v.h> #include <macros.h> #define uchar unsigned char #define uint unsigned int //**********定义全局变量*******************// //查表0 1 2 3 4 5
阅读全文
摘要:手机:内部存储设备--ANDROID-data-com.mipay.wallet-mipushlog--log.lock log1.txt 设置--更多设置--按键快捷方式-小米钱包--双击电源键
阅读全文
摘要:extern是C/C++语言中表明函数和全局变量的作用范围的关键字,该关键字告诉编译器,其申明的函数和变量可以在本模块或其他模块中使用。 语句:extern int a; 仅仅是一个变量的声明,其并不是在定义变量a,也并未为a分配空间。变量a在所有模块中作为一种全局变量只能被定义一次,否则会出错。
阅读全文
摘要:单片机C语言模块化设计模块化设计是为了以后相同功能的代码方便调用,避免重复输入代码。我们原来写过延时函数、按键判断等,在写新程序时可以直接添加并引入。A 通过头文件引入到新工程中 以延时函数为例: 1.延时函数代码所在文件:delay.c 必须引入delay.h头文件 具体代码如下: #includ
阅读全文
摘要:鸿合HITEVISION HD-I6590EHO-3819 19V4.74A希沃 mt21
阅读全文
摘要://读内部R/C时钟及ID号C语言参考程序 #include<reg51.h> #include<intrins.h> sfr IAP_CONTR = 0xC7; sbit MCU_Start_Led = P1^7; //unsigned char self_command_array[4] = {
阅读全文
摘要:PROM,称之为可编程存储器。这就象我们的练习本,买来的时候是空白的,能写东西上去,可一旦写上去,就擦不掉了,所以它只能用写一次,要是写错了,就报销了。(现在已经被淘汰) EPROM,称之为紫外线擦除的可编程只读存储器。它里面的内容写上去之后,如果觉得不满意,能用一种特殊的办法去掉后重写,这就是用紫
阅读全文