那个大神来给瞅瞅 哪里错了 为啥。。t没有被初始化
# include <stdio.h>int max(int x, int y, int z)
{
int t;
if (x>y && x>z)
{
t = x;
}
else if (x<y && x>z)
{
t = y;
}
else if (x>y && x<z)
{
t = x;
}
else
{
printf("请重新输入\n");
}
return(t);
}
int main(void)
{
int a, b, c;
int f;
printf("请输入3个数(每之间用空格间隔):");
scanf("%d %d %d", &a, &b, &c);
f = max(a, b, c);
printf("%d\n", f);
return 0;
}
——————————————————————————————————————
Run-Time Check Failure #3 - The variable 't' is being used without being initialized
——————————————————————————————————————
[ 本帖最后由 樱花000 于 2013-7-20 19:05 编辑 ]