main.c(14): error C141: syntax error near '{' 求解??
#include<reg51.h>#defineLEDP0voiddelayms(void){unsignedinttemp_t;for(temp_t=0;temp_t<...
#include <reg51.h>
#define LED P0
void delayms (void )
{
unsigned int temp_t;
for (temp_t=0;temp_t<40000;temp_t++);
}
void main (void)
{
unsigned char k=0;
while((1)
{
if(k<6)
{
switch(k)
{
case 0:LED=0x3f ;break;
case 1:LED=0x06 ;break;
case 2:LED=0x5b ;break;
case 3:LED=0x66 ;break;
case 4:LED=0x6d ;break;
case 5:LED=0x7d ;break;
default:break;
}
delayms();
k++;
}
else
{
k=0;
}
}
} 展开
#define LED P0
void delayms (void )
{
unsigned int temp_t;
for (temp_t=0;temp_t<40000;temp_t++);
}
void main (void)
{
unsigned char k=0;
while((1)
{
if(k<6)
{
switch(k)
{
case 0:LED=0x3f ;break;
case 1:LED=0x06 ;break;
case 2:LED=0x5b ;break;
case 3:LED=0x66 ;break;
case 4:LED=0x6d ;break;
case 5:LED=0x7d ;break;
default:break;
}
delayms();
k++;
}
else
{
k=0;
}
}
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询