運(yùn)行有錯(cuò)誤
#include<stdio.h>
main()
{
????printf("These values are :\n");
????int x=y=2.5;
????printf("x=%d\n",x);
????printf("y=%d\n",y);
????printf("z=%d\n",z);
}
#include<stdio.h>
main()
{
????printf("These values are :\n");
????int x=y=2.5;
????printf("x=%d\n",x);
????printf("y=%d\n",y);
????printf("z=%d\n",z);
}
2018-10-14
舉報(bào)
2018-10-15
哦,對(duì)了你的定義類型還錯(cuò)了
2018-10-15
不是連續(xù)賦值的問題
#include<stdio.h>
int? main()
{
printf("These values are :\n");
float y;
float x = y = 2.5;
int z=0;
printf("x=%d\n", x);
printf("y=%d\n", y);
printf("z=%d", z);
return 0;
}
你的代碼不完整,沒有給main()定義類型,沒有定義y的類型,沒有定義z的類型和值,最后你還沒有加上返回return 。
2018-10-14
在定義中不允許連續(xù)賦值,不合法
2018-10-14
#include<stdio.h>
main()
{
????printf("These values are :\n");
????int x=2.5
? ? y=2.5;
????printf("x=%d\n",x);
????printf("y=%d\n",y);
????printf("z=%d\n",z);
}
不可以連=