[求助]为什么我输入任何东西输出全都是1
代码在这,请帮我看一下,这是为什么,我很纳闷!!!不管输入任何东西,出来的结果都是 1
汗了!!
#include <stdio.h>
//#include <math.h>
void main()
{
int a,hei;
//int a,hei,x2,x3,fenshu,genhao,genzhi;
//printf("please scanf tree numbers\n");
//scanf("x1=%d,x2=%d,x3=%d",&x1,&x2,&x3);
hei=scanf("%d",&a);
printf("输入的值为%d\n",hei);
//printf("你输入的三个数分别为\nx1=%d\nx2=%d\nx3=%d\n",x1,x2,x3);
}
//#include <math.h>
void main()
{
int a,hei;
//int a,hei,x2,x3,fenshu,genhao,genzhi;
//printf("please scanf tree numbers\n");
//scanf("x1=%d,x2=%d,x3=%d",&x1,&x2,&x3);
hei=scanf("%d",&a);
printf("输入的值为%d\n",hei);
//printf("你输入的三个数分别为\nx1=%d\nx2=%d\nx3=%d\n",x1,x2,x3);
}