qq_慕娘6428473
2016-12-30 09:33
#include
int main() { int height = 175; //身高为175cm double money = 1500000; //银行存款为150万 printf("是否符合条件:%d\n", (height>=180)&& (money>=1000000)) ;//填写算式 return 0; }
为什么bu对啊?应该怎么写,我真的不知道了,试了好多次都不对。
虽然提示不对但是你写的是没问题的,为了保障优先级所以加了括号,但是这个网站没有识别,所以提示你错误
不加任何括号完全没问题,因为关系运算符(》=)的优先级比逻辑运算符(&&)的优先级高
#include <stdio.h>
int main()
{
int height = 175; //身高为175cm
double money = 1500000; //银行存款为150万
printf("是否符合条件:%d\n", height>=180&&money>=1000000); //填写算式
return 0;
}
C语言入门
926866 学习 · 21068 问题
相似问题