本帖最后由 梦中的婚礼 于 2012-11-2 18:54 编辑
不知你要的是不是这种效果:
你编写的代码不规范:
有几处错误,
更正如下:
#include <stdio.h>
main()
{
printf("\n\n Enter a number of dacimal:");
double a,b;
scanf("%lf",&a);
b=a;
printf("\n %lf",b);
getch();
return 0;
}
备注:使用 scanf 时格式要正确,int 的话,应该是 scanf("%d",&xx); (xx可以随便是你喜欢的)。
|