自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 问答 (1)
  • 收藏
  • 关注

原创 利用C语言输入二进制转化成十进制。

#include<stdio.h>#include<string.h>#include<math.h>#define AS 20void qw(char ps[],int v);int u = 0;int main(void){ int p = 0; char as[AS]; while (1) { printf("请输入二进制数:"); gets_s(as, AS - 1); p = strlen(as); qw(as, p);.

2022-05-10 00:00:08 3675 2

原创 C语言编写预定机票程序

#include<stdio.h>#include<string.h>#define AS 12#define S 10struct as { int q[AS]; char w[AS]; char e[AS]; char t[AS];};void b(struct as* pc);void qq(void);void aa(void);void a(struct as ww[]);void c(struct as ee[]);int d(struc.

2022-05-04 23:18:09 1100

原创 【无标题】利用C语言结构体计算输入的每一位学生的平均分数,并存入结构体中。

#include<stdio.h>#include<stdlib.h>#include<string.h>#define AS 20#define ZX 15#define CSIZE 4struct aa { char q[AS]; char w[ZX];};struct student { struct aa name; float grade[AS]; float e[AS];};void san(void);void qq(str.

2022-05-02 23:38:18 1016

原创 C语言嵌套结构的编程

#include<stdio.h>#include<string.h>#define AS 5#define QW 20#define RR 2struct ww { char w[QW]; char e[QW]; char r[QW];};struct ss { char q[QW]; struct ww f;};void vv(struct ss *g);struct ss h[AS];int main(void){ char* ch; c.

2022-04-29 23:20:10 1114

原创 利用C语言结构体编写简易图书管理系统

#include<stdio.h>#include<stdlib.h>#include<string.h>#define AS 40#define QW 40#define ZX 100#define Y 10struct ss { char q[AS]; char w[QW]; float e;};struct ss as;void f(void);void x(struct ss cc[]);void p(struct ss nn[]).

2022-04-29 13:20:49 1306

原创 C语言,输入年月日,返回总天数,可改写成打印一个月中的假期天数。

#include<stdio.h>#include<string.h>#include<stdlib.h>#define AS 12#define QW 20#define SS 7struct as { char w[AS];};struct qw { int q; int h; int o;};struct yu { char* s[2]; char aa[2];};void qq(void);int gg(struct as .

2022-04-28 00:33:34 477

原创 【无标题】利用C语言建立文件并输入文件内容,在文件中显示行。

#include<stdio.h>#include<stdlib.h>#include<string.h>#include<ctype.h>#define AS 40char* zx(char* cv, int n);int main(void){ char qw[AS]; char ty[AS]; FILE* as; errno_t er; char *ch; char yy; int w=0; printf("请输入文件...

2022-04-19 00:34:26 104

原创 利用C语言创建文件并输入文件内容。

#include<stdio.h>#include<stdlib.h>#include<string.h>#define AS 200char* ty(char* df, int n);int main(void){ FILE* as; char qw[AS]; char zx[AS]; char ch; errno_t er; printf("请输入文件名:"); ty(qw, AS); if ...

2022-04-19 00:24:19 3505

原创 c51 T0中断计数器,按下按钮LED灯依次亮

#include<reg51.h>unsigned char t;void timer0_() interrupt 1{ TH0=(256-1); TL0=(256-1); t++; switch(t) { case 1:P1=0xFE;break; case 2:P1=0xFC;break; case 3:P1=0xF8;break; case 4:P1=0xF0;break; case 5:P1=0xE0;break; case.

2021-12-24 11:39:02 581

原创 C51,利用定时器t0,设计时钟(通过led点亮方式显示)

采用中断扩展方式实现1 s定时。将内存单元30H、31H、32H分别作为时、分、秒单元,每当定时1 s到时,秒单元内容加1,同时秒指示灯闪;满60 s,则分单元加1,同时分指示灯闪;满60 min,则时单元加1,同时,时指示灯闪;满24 h后将时单元清“0”,同时熄灭所有指示灯。#include<reg52.h>sbit P1_0=P1^0;sbit P1_3=P1^3;sbit P1_7=P1^7;int i,y,a,b,o;void delayms (unsigned int

2021-12-19 19:42:51 1265

原创 C51 秒表设计,定时器查询法,精确到0.01秒

#include <reg52.h>#include <stdlib.h>#define uint unsigned long#define uchar unsigned charsbit N1 = P1^4;sbit N2 = P1^5;sbit N3 = P1^6;sbit N4 = P1^7;sbit A1 = P3^1;sbit A2 = P3^0;sbit A3 = P3^2;uchar code table[]={0xc0,0xf9,0xa4,0..

2021-12-19 16:49:59 1323 1

原创 C51 ISIS仿真 ,外部中断嵌套

高、低优先级中断服务程序嵌套。Proteus仿真电路,在8051单片机外部中断、端分别通过两个按键接地,单片机的P0、P1、P2口分别接3个共阳极LED数码管。将设置为高优先级,设置为低优先级,负边沿触发。主程序在开中断后进入循环状态,通过P0口循环显示“1”~“8”字符,此时无论按下“低优先级”或“高优先级”按键,主程序都会被中断,进入中断服务程序,通过P2或P1口显示“1”~“8”字符。如果先按下“低优先级”按键,则P0口的显示将停在某一数字,进入低优先级中断服务程序,通过P2口显示“1”~“8”字

2021-12-16 23:36:38 1140

原创 C51 isis仿真 外部中断扩展,利用LED指示灯显示

#include<reg52.h>sbit P1_1=P1^1;sbit P1_3=P1^3;sbit P1_0=P1^0;sbit P1_2=P1^2;void timer0( ) interrupt 0{ TCON=0x00; if(P1_0==1) { P1_1=0; } if(P1_2==1) { P1_3=0; }}void timer1 ( ) interrupt 2{ TCON=0x00; P1=0xFF; }int ..

2021-12-15 23:26:50 754

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除