c how to program 习题2.30

发布于2020-03-12 830 热度

//c how to program 习题2.30
#include <stdio.h>

int main( void )
{
	printf("请输入一个5位的整数:");
	int number, temp;
	scanf("%d", &number);
	int a, b, c, d, e;
	temp = number;
	a = temp / 10000;
	temp = number % 10000;
	b = temp / 1000;
	temp = temp % 1000;
	c = temp / 100;
	temp = temp % 100;
	d = temp / 10;
	temp = temp % 10;
	e = temp;
	printf("%d   %d   %d   %d   %d\n", a, b, c, d, e);
} 

记录工作,记录学习,分享知识,分享经验……