#include "reg52.h" #include "stdlib.h" typedef unsigned int u16; void delay(u16 i) { while(i--) {}; } void main() { srand(0); while(1) { P2=rand()&0xff; delay(60000); } }
LED灯随机亮起几个灯
原文:https://www.cnblogs.com/yfish/p/10854043.html