> 其他 >
编写程序计算并输出 下面各逻辑表达式的值.设a=3,b=4,c=5 (1) a+b>c&&b==c (2) a||b+c&&b-c (3) (a>b)&
人气:161 ℃ 时间:2019-11-18 12:52:38
解答
.
这种简单问题都问...拜托稍微动点脑细胞,不然还写个P程序.
#include
int main(int argc,char* argv[])
{
int a = 3;
int b = 4;
int c = 5;
int res = (a + b > c && b == c);
printf("%d\n",res);
res = (a || b + c && b - c);
printf("%d\n",res);
//.
return 0;
}
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版