#include <stdio.h>//#define NUM_TYPE 6 @编译时指定int main (void) {unsigned int n = 0, y = 0, res = 0;unsigned int cnt = 1;printf ("请输入一个非负数:");scanf ("%d", &n);while (1) {y = n % NUM_TYPE;res = cnt * y
STM32CubeIde 实现printf打印输出,在IDE生成的程序的main中的/* USER CODE BEGIN 4 /和/ USER CODE END 4 */之间放下面代码: #ifdef __GNUC__#define PUTCHAR_PROTOTYPE int __io_putchar(int ch)#define GETCHAR_PROTOTYPE int __io_get