• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






zxf

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

11 2017 档案

 
计数器 中断
摘要:#include #define uint unsigned int #define uchar unsigned char sbit lw=P3^1; sbit ld=P3^0; uchar duan[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}; uchar wei[]={0x01,0x02,0x04,0x08,0... 阅读全文
posted @ 2017-11-29 20:42 邹秀芳 阅读(240) 评论(0) 推荐(0)
计算利润
摘要:/* Note:Your choice is C IDE */ #include "stdio.h" void main() { //定义变量 long int i; double bonus1,bonus2,bonus4,bonus6,bonus10,bonus; //输入利润数 printf("请输入利润数"); scanf("%1d",&i); ... 阅读全文
posted @ 2017-11-22 20:08 邹秀芳 阅读(301) 评论(0) 推荐(0)
外部中断0,1
摘要:#include #define uint unsigned int #define uchar unsigned char uchar duan[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; uchar liushui[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f}; ucha... 阅读全文
posted @ 2017-11-22 20:04 邹秀芳 阅读(447) 评论(1) 推荐(0)
矩形按键
摘要:1 #include 2 #define uint unsigned int 3 #define uchar unsigned char 4 uchar keynum=0; 5 uchar duan[]={0xc0,~0x06,~0x5b,~0x4f,~0x66,~0x6d,~0x7d,~0x07,~0x7f,~0x6f,~0x77,~0x7c,~0x39,~0x... 阅读全文
posted @ 2017-11-22 15:03 邹秀芳 阅读(510) 评论(0) 推荐(0)
倒数100
摘要:#include #define uint unsigned int #define uchar unsigned char uchar duan[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}; sbit w1=P2^0; sbit w2=P2^1; uint num=0; void delay(uint n) { whil... 阅读全文
posted @ 2017-11-18 15:53 邹秀芳 阅读(223) 评论(0) 推荐(0)
空矩形星星排列图源程序
摘要:/* Note:Your choice is C IDE */ #include "stdio.h" void main() { int row,col,r,c; printf("请输入行数"); scanf("%d",&row); printf("请输入列数"); scanf("%d",&col); for(r=1;r1&&r1&&c<col) printf("... 阅读全文
posted @ 2017-11-18 15:49 邹秀芳 阅读(272) 评论(0) 推荐(0)
点名源程序
摘要:/* Note:Your choice is C IDE */ #include "stdio.h" #include "stdlib.h" #include "time.h" void main() { int i,j; char name; srand((unsigned)time(NULL)); for(j=1;j<=10;j++) { ... 阅读全文
posted @ 2017-11-18 15:47 邹秀芳 阅读(163) 评论(0) 推荐(0)
计数器
摘要:#include #define uint unsigned int #define uchar unsigned char uchar duan[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x83,0xc6,0xa1,0x86,0x8e,0x71,0x0e,0x0c,0x0b,0x07}; // ... 阅读全文
posted @ 2017-11-15 20:03 邹秀芳 阅读(195) 评论(0) 推荐(0)
按键
摘要:#include #define uint unsigned int #define uchar unsigned char sbit k1=P3^2; sbit k2=P3^3; uchar duan[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};//阴极管的代码 数组 char num=0;//定义一个数调用数组的... 阅读全文
posted @ 2017-11-15 20:00 邹秀芳 阅读(179) 评论(0) 推荐(0)
游戏石头剪刀布
摘要:/* Note:Your choice is C IDE */ #include "stdio.h" #include "stdlib.h"//srand rand调用的头文件 #include "time.h"// void main() { int ren;//定一个人输入的拳种 int i; //用于for循环的条件 int x; //开关语句 int jq; // ... 阅读全文
posted @ 2017-11-14 16:51 邹秀芳 阅读(201) 评论(0) 推荐(0)
继电器
摘要:#include <reg52.h> #define uint unsigned int #define uchar undingned char sbit relay=P2^7; void delayn50ms(uint n) { uint i,j; for(i=0;i<n;i++) for(j= 阅读全文
posted @ 2017-11-13 22:19 邹秀芳 阅读(138) 评论(0) 推荐(0)
分解质因数
摘要:#include "stdio.h" void main() { int a,b=2,c=0,d; printf("请输入一个数:"); xx: c=scanf("%d",&a); if(c!=1||a=b;) { if(a%b==0) { if(a!=b) printf(... 阅读全文
posted @ 2017-11-13 22:10 邹秀芳 阅读(166) 评论(0) 推荐(0)
斐波那契数列
摘要:#include "stdio.h" void main() { int a,b,c,i; a=b=1; printf("%d\n %d\n",a,b); for(i=1;i<=13;i++) { c=a+b; printf("%d\n",c); a=b; b=c; } } 阅读全文
posted @ 2017-11-13 22:09 邹秀芳 阅读(151) 评论(0) 推荐(0)
猜字游戏
摘要:1 /* Note:Your choice is C IDE */ 2 #include "stdio.h" 3 #include 4 #include 5 void main() 6 { 7 int i,j; 8 srand((unsigned)time(NULL));//生成不重复的随机数stdlib.h 9 j=rand() %100;// 10 ... 阅读全文
posted @ 2017-11-13 21:36 邹秀芳 阅读(215) 评论(0) 推荐(0)
求园的周长、面积、直径
摘要:1 #include "stdio.h" 2 void main() 3 { 4 float PI,r,C,S,d; 5 PI=3.14f;/*将3.14存入到PI所分配的内存空间中*/ 6 7 printf("请输入一个圆的半径:"); 8 scanf("%f",&r);/*将键盘输入的数据存入到 阅读全文
posted @ 2017-11-13 21:32 邹秀芳 阅读(310) 评论(0) 推荐(0)