我的输出有问题,求教
#include<stdio.h>#include<math.h>
int main()
{
double s,j;
int i,q,g;
char*a[]={"壹","贰","叁","肆","伍","陆","柒","捌","玖"};
char*b[]={"元","拾","佰","仟","萬","拾","佰","仟","亿"};
char*d[]={"角","分"};
for( ; ; )
{
printf("此程序用于实现大小写的转换\n您输入阿拉伯数字,我们将为您转换为汉字\n请输入阿拉伯数字:\n");
scanf("%lf",&s);
i=12;
for(q=i-1;q>=0;q--)
{
j=s/pow(10,q);
g=(int)j%10;
if(g!=0)
printf("%s%s",a[g-1],b[q]);
}
for(q=-1;q>=-2;q--)
{
j=s/pow(10,q);
g=(int)j%10;
if(g!=0)
printf("%s%s",a[g-1],d[-q-1]);
}
printf("\n\n");
}
}