注册 登录
编程论坛 新人交流区

新人求助输出问题

hello0607 发布于 2007-10-18 14:38, 232 次点击
#include<stdio.h>
#include<stdlib.h>
main()
{
int x,y,z,n;
printf("Please input four digits:\n");
scanf("%d",&x);
y=1000;
for(n=1;n<=4;n=n+1)
{
z=x/y;
printf(" %c ",z);
x=x%y;
y=y/10;
}
printf(" \n");
system("Pause");
}
我用的DEVC++
输出时随机图形比如方块,梅花...
请问怎么回事?

[此贴子已经被作者于2007-10-18 14:41:32编辑过]

2 回复
#2
hello06072007-10-18 14:48
恩知道了...
下面的%d打成%c了...OTL
#3
chengyukyo12007-10-18 15:06
恭喜 以后记住的更加牢固了 哈哈
1