代码
#include<reg51.h>
#define SEG P0
unsigned char code Tab[]={0x40,0x79,0x24,0x30,0x19,0x12,0x02,0x78,0x00,0x10};
void delay(int k);
void main(){
int i;
SEG=1;
while(1)
{
for(i=0;i<10;i++)
{
SEG=Tab[i];
delay(1300000);
}
}
}
void delay(int k){
while(k--);
}