首页上一页 1 下一页尾页 1 条记录 1/1页
那里错了
发表在C语言图书答疑
2016-09-21
是否精华
是
否
版块置顶:
是
否
#include<reg51.h>
sbit led6=P2^7;
sbit led5=P2^5;
sbit led4=P2^2;
sbit P2_4=P2^4;
sbit P2_3=P2^3;
sbit P2_6=P2^6;
void delay(unsigned char i);
void main()
{
while(1)
{
P2_4=1;
delay(100);
P2_4=0;
delay(100);
P2_3=1;
delay(50);
P2_3=0;
delay(50);
P2_6=1;
delay(30);
P2_6=0;
delay(30);
}
}
void delay(unsigned char i);
{
for(j=0; j<i; j++)
for(k=0; k<255; k++);
}
sbit led6=P2^7;
sbit led5=P2^5;
sbit led4=P2^2;
sbit P2_4=P2^4;
sbit P2_3=P2^3;
sbit P2_6=P2^6;
void delay(unsigned char i);
void main()
{
while(1)
{
P2_4=1;
delay(100);
P2_4=0;
delay(100);
P2_3=1;
delay(50);
P2_3=0;
delay(50);
P2_6=1;
delay(30);
P2_6=0;
delay(30);
}
}
void delay(unsigned char i);
{
for(j=0; j<i; j++)
for(k=0; k<255; k++);
}