#include void main(){int a,b;scanf("%d %d" ,a,b);printf("%d %d\n" ,a,b);}然后就local variable 'a' used without having been initialized了本地变量"a"未初始化 应该怎么该?

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/18 16:13:10
#includevoidmain(){inta,b;scanf("%d%d",a,b);printf("%d%d\n",a,b);}然后就localvariable''a''usedwithouthavi

#include void main(){int a,b;scanf("%d %d" ,a,b);printf("%d %d\n" ,a,b);}然后就local variable 'a' used without having been initialized了本地变量"a"未初始化 应该怎么该?
#include
void main()
{
int a,b;
scanf("%d %d" ,a,b);
printf("%d %d\n" ,a,b);
}
然后就local variable 'a' used without having been initialized了
本地变量"a"未初始化
应该怎么该?

#include void main(){int a,b;scanf("%d %d" ,a,b);printf("%d %d\n" ,a,b);}然后就local variable 'a' used without having been initialized了本地变量"a"未初始化 应该怎么该?
改成
scanf("%d,%d",&a,&b);

本地变量"a"未初始化