C语言 - 回文数

C语言 - 回文数

/*输出四位数中的所有回文数*/
#include<stdio.h>
#include<stdlib.h>

int main(int argc, char const *argv[])
{
	for (int a = 1; a < 10; ++a)
	{
		for (int b = 0; b < 10; ++b)
		{
			int res_int = a + b * 10 + b * 100 + a * 1000;
			printf("%d\n\n", res_int);
		}
	}
	system("pause");
	return 0;
}
发布了19 篇原创文章 · 获赞 23 · 访问量 3904

猜你喜欢

转载自blog.csdn.net/weixin_43737206/article/details/88881430
今日推荐