#include<stdio.h>#include<stdlib.h>typedef struct N{ int i; struct N* next;}List;int main(void){ List *L,*H,*P,*Q; L=(List *)malloc(sizeof(List)); L->i=1; L->next=NULL; H=L; P=L; int j; int n=0; int k=0; for(j=2;j<=30;j++){ Q=(List *)malloc(sizeof(List))...
#include<stdio.h>#include<stdlib.h>#define MaxSize 100#define ApplySpaceFail -1#define TRUE 1#define FALSE 0#define UNLIMIT 65535#define Edges 15int visited[MaxSize];int P[MaxSize];int D[MaxSize];int PF[MaxSize][MaxSize];int DF[MaxSize][MaxSize];typedef struct Graph{ char vex[MaxSize]; ...
//-------------------------------------------//头文件//-------------------------------------------#include<reg51.h>#include<stdio.h>typedef unsigned char uchar;typedef unsigned char uint;uchar counter=0;sbit key1=P3^2;sbit key2=P3^3;sbit key3=P3^4;sbit key4=P3^5;//---------------------------...
好久没发代码了,最近在学单片机,就写了一些简单的东西,高手见笑了!
#include<reg52.h>#include<stdio.h>unsigned int i=0;typedef unsigned char unchar;unchar Ledinit=0xE7;unchar LedshiftL=0xDF;unchar LedshiftR=0xFB;unchar r=0x01;unchar l=0x80; unchar counter=0;void Init_timer(void){ TMOD=0x22; TH0=TL0=56; TR0=1; ...
Four score and seven years ago our fathers brought forth on this continient
a new nation conceived in leberty and dedicated to the propersition that all men
are created equal.
Now we are engaged in agreat civil war ,testing wheather that nation or any
nation so conceived ...
#include<stdio.h>#include<graphics.h>#include<dos.h>#include<math.h>#include<conio.h>#include<stdlib.h>#include<time.h>#define PI 3.1415926 #define angle1 3.1415926/5#define angle2 3.1415926/10#define angle3 3.1415926/180 extern int s=9; void output_result(int n1,int n2,int n3,int n4,int n5,in...
#include<stdio.h>#include<graphics.h>#include<math.h>#include<stdlib.h>#include<dos.h>#include<conio.h>#include<time.h>
#define PI 3.1415926
void output_text() /*输出文本*/ { outtextxy(120,200,"Dear friends:"); outtextxy(120,215," Do you know ,everything in the space i...