本章我们就通过移植网上别人已经做好的文件来实现格式化函数。
1、 复制stdio文件夹到工程中

2、 修改main.c
#include "stdio.h"
....
while (1)
{
puts("输入两个整数,使用空格隔开:");
scanf("%d %d",&a,&b);
printf("\r\n 数据%d + %d = %d\r\n\r\n", a, b, a+b);/* 输出和 */
led_state = !led_state;
led_switch(LED0, led_state);
}
3、修改Makefile



4、 编译&&测试
网友评论