求教,这有一个程序,可以运行,但是不能输出我想要的值!哪位大佬出手相救!
#include<stdio.h>void main()
{
float s;
int x;
printf("此程序可以实现大小写的转换\n请输入阿拉伯数字:");
scanf("%d\n",&s);
x=s/100000000;
if(x==0)
{
x=s/10000000;
if(x==0)
{
x=s/1000000;
if(x==0)
{
x=s/100000;
if(x==0)
{
x=s/10000;
if(x==0)
{
x=1000;
if(x==0)
{
x=s/100;
if(x==0)
{
x=s/10;
if(x==0)
{
x=s/1;
if(x==0)
{printf(" ");}
else
{
if(x==1)
printf("壹元");
if(x==2)
printf("贰元");
if(x==3)
printf("叁元");
if(x==4)
printf("肆元");
if(x==5)
printf("伍元");
if(x==6)
printf("陆元");
if(x==7)
printf("柒元");
if(x==8)
printf("捌元");
if(x==9)
printf("玖元");
}
}
if(x==1)
printf("壹佰");
if(x==2)
printf("贰佰");
if(x==3)
printf("叁佰");
if(x==4)
printf("肆佰");
if(x==5)
printf("伍佰");
if(x==6)
printf("陆佰");
if(x==7)
printf("柒佰");
if(x==8)
printf("捌佰");
if(x==9)
printf("玖佰");
}
else
{
if(x==1)
printf("壹佰");
if(x==2)
printf("贰佰");
if(x==3)
printf("叁佰");
if(x==4)
printf("肆佰");
if(x==5)
printf("伍佰");
if(x==6)
printf("陆佰");
if(x==7)
printf("柒佰");
if(x=8)
printf("捌佰");
if(x==9)
printf("玖佰");
}
}
else
{
if(x==1)
printf("壹仟");
if(x==2)
printf("贰仟");
if(x==3)
printf("叁仟");
if(x==4)
printf("肆仟");
if(x==5)
printf("伍仟");
if(x==6)
printf("陆仟");
if(x==7)
printf("柒仟");
if(x==8)
printf("捌仟");
if(x==9)
printf("玖仟");
}
}
else
{
if(x==1)
printf("壹萬");
if(x==2)
printf("贰萬");
if(x==3)
printf("叁萬");
if(x==4)
printf("肆萬");
if(x=5)
printf("伍萬");
if(x==6)
printf("陆萬");
if(x==7)
printf("柒萬");
if(x==8)
printf("捌萬");
if(x==9)
printf("玖萬");
}
}
else
{
if(x==1)
printf("壹拾萬");
if(x==2)
printf("贰拾萬");
if(x==3)
printf("叁拾萬");
if(x==4)
printf("肆拾萬");
if(x==5)
printf("伍拾萬");
if(x==6)
printf("陆拾萬");
if(x==7)
printf("柒拾萬");
if(x==8)
printf("捌拾萬");
if(x==9)
printf("玖拾萬");
}
}
else
{
if(x==1)
printf("壹佰萬");
if(x==2)
printf("贰佰萬");
if(x==3)
printf("叁佰萬");
if(x==4)
printf("肆佰萬");
if(x==5)
printf("伍佰萬");
if(x==6)
printf("陆佰萬");
if(x==7)
printf("柒佰萬");
if(x==8)
printf("捌佰萬");
if(x==9)
printf("玖佰萬");
}
}
else
{
if(x==1)
printf("壹仟萬");
if(x==2)
printf("贰仟萬");
if(x==3)
printf("叁仟萬");
if(x==4)
printf("肆仟萬");
if(x==5)
printf("伍仟萬");
if(x==6)
printf("陆仟萬");
if(x==7)
printf("柒仟萬");
if(x==8)
printf("捌仟萬");
if(x==9)
printf("玖仟萬");
}
}
else
{
if(x==1)
printf("壹亿");
if(x==2)
printf("贰亿");
if(x==3)
printf("叁亿");
if(x==4)
printf("肆亿");
if(x==5)
printf("伍亿");
if(x==6)
printf("陆亿");
if(x==7)
printf("柒亿");
if(x==8)
printf("捌亿");
if(x==9)
printf("玖亿");
}
}