main() { int a,d; scanf("%d%d",&a,&d); if((a3000)||(a>30&&d>8000)) { printf("uuuuu"); } elsemain(){int a,d;scanf("%d%d",&a,&d);if(a3000||a>30&&d>8000){printf("uuuuu");}else{printf("123");}getch();}请问IF语句有没错他和if((a3000)||(a>30&&d>800
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/13 03:32:11
main() { int a,d; scanf("%d%d",&a,&d); if((a3000)||(a>30&&d>8000)) { printf("uuuuu"); } elsemain(){int a,d;scanf("%d%d",&a,&d);if(a3000||a>30&&d>8000){printf("uuuuu");}else{printf("123");}getch();}请问IF语句有没错他和if((a3000)||(a>30&&d>800
main() { int a,d; scanf("%d%d",&a,&d); if((a3000)||(a>30&&d>8000)) { printf("uuuuu"); } else
main()
{
int a,d;
scanf("%d%d",&a,&d);
if(a3000||a>30&&d>8000)
{
printf("uuuuu");
}
else
{
printf("123");
}
getch();
}
请问IF语句有没错他和if((a3000)||(a>30&&d>8000)) ,有什么不同,为什么我在那台电脑不行这台行呀,我用的是WTC
main() { int a,d; scanf("%d%d",&a,&d); if((a3000)||(a>30&&d>8000)) { printf("uuuuu"); } elsemain(){int a,d;scanf("%d%d",&a,&d);if(a3000||a>30&&d>8000){printf("uuuuu");}else{printf("123");}getch();}请问IF语句有没错他和if((a3000)||(a>30&&d>800
没有错,&&的优先级高于||所以加不加括号对逻辑表达式没有影响.