标题:一个达不到效果程序
取消只看楼主
alonefire
Rank: 1
等 级:新手上路
帖 子:32
专家分:0
注 册:2006-2-21
 问题点数:0 回复次数:0 
一个达不到效果程序

/* Note:Your choice is C IDE */
#include "stdio.h"
main()
{
int a,b,c,d,e,f;
scanf("%d",&a);
if(0<=a&&a<=9) printf("1\n");
else if(10<=a&&a<=99) printf("2\n");
else if(100<=a&&a<=999) printf("3\n");
else if(1000<=a&&a<=9999) printf("4\n");
else if(10000<=a&&a<=99999) printf("5\n");
else printf("wrong\n");
if(0<=a&&a<=9) a=f;
else if (10<=a&&a<=99) a=10*e+f;
else if (100<=a&&a<=999) a=100*d+10*e+f;
else if(1000<=a&&a<=9999) a=1000*c+100*d+10*e+f;
else if(10000<=a&&a<=99999) a=10000*b+1000*c+100*d+10*e+f;
else printf("wrong\n");
if(0<=a&&a<=9) printf("%d\n",f);
else if (10<=a&&a<=99) printf("%d,%d\n",e,f);
else if (100<=a&&a<=999) printf("%d,%d,%d\n",d,e,f);
else if(1000<=a&&a<=9999) printf("%d,%d,%d,%d\n",c,d,e,f);
else if(10000<=a&&a<=99999) printf("%d,%d,%d,%d,%d\n",b,c,d,e,f);
else printf("wrong\n");
if(0<=a&&a<=9) printf("%d\n",f);
else if (10<=a&&a<=99) printf("%d,%d\n",f,e);
else if (100<=a&&a<=999) printf("%d,%d,%d\n",f,e,d);
else if(1000<=a&&a<=9999) printf("%d,%d,%d,%d\n",f,e,d,c);
else if(10000<=a&&a<=99999) printf("%d,%d,%d,%d,%d\n",f,e,d,c,b);
else printf("wrong\n");


}

搜索更多相关主题的帖子: include choice wrong 
2006-02-21 21:10



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-46519-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.094453 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved