• A


    #include<stdio.h>
    int main(void)
    {
    	int count,number;
    	int a,b,c,d,e;
    
    	count=0;
    	scanf("%d",&number);
    	do{
    		number=number/10;
    		count++;
    	}while(number!=0);
    	if(count=1){
    		a=number;
    		printf("%d
    ",count);
    		printf("%d",a);
    	}
    	
    	else if(count=2){
    		a=number/10;
    		b=number-a*10;
    		printf("%d
    ",count);
    		printf("%d %d",a,b);
    	}
    	else if(count=3){
    		a=number/100;
    		b=(number-a*100)/10;
    		c=number-a*100-b*10;
    		printf("%d
    ",count);
    		printf("%d %d %d",a,b,c);
    	}
    	else if(count=4){
    		a=number/1000;
    		b=(number-a*1000)/100;
    		c=(number-a*1000-b*100)/10;
    		d=number-a*1000-b*100-c*10; 
    		printf("%d
    ",count);
    		printf("%d %d %d %d",a,b,c,d);
    	}
    	else if(count=5){
    		a=number/10000;
    		b=(number-a*10000)/1000;
    		c=(number-a*10000-b*1000)/100;
    		d=(number-a*10000-b*1000-c*100)/10;
    		e=number-a*10000-b*1000-c*100-d*10;
    		printf("%d
    ",count);
    		printf("%d %d %d %d %d",a,b,c,d,e);
    	}
    	while(number!=0){
    		printf("%d",number%10);
    		number=number/10;
    	}
    
    	return 0;
    }
    
    
  • 相关阅读:
    自定义 cell
    iOS的自动布局
    通过字符串获取沙盒路径延展类
    Orcale nvl函数
    Orcale sign函数
    Orcale decode函数
    Orcale rpad函数
    mapper.xml速查
    Spring Boot整合SpringMVC应用
    Spring Boot 整合MyBatis框架
  • 原文地址:https://www.cnblogs.com/huangsilinlana/p/3464639.html
Copyright © 2020-2023  润新知