#define _CRT_SECURE_NO_WARNINGS标签:11,10,正整数,入门,no,int,练习,while,printf From: https://blog.51cto.com/u_15866017/5951153
#include <stdio.h>
int main()
{
int no;
do
{
printf("请输入一个正整数");
scanf("%d", &no);
if (no <= 0)
printf("请不要输入一个非正整数");
} while (no <= 0);
printf("%d逆向显示的结果是",no);
while (no > 0)
{
printf("%d", no % 10);
no = no / 10;//循环到最后一个1的时候,1/10=0.1取整为0
}
putchar('.');
return 0;
}