当前位置: 首页 > news >正文

帝国cms网站名称做网站优化选阿里巴巴还是百度

帝国cms网站名称,做网站优化选阿里巴巴还是百度,宁波公司,php制作网站后台c语言中的逻辑运算符逻辑运算符 (Logical Operators) Logical operators are used to check the combinations of the two conditional expressions. 逻辑运算符用于检查两个条件表达式的组合。 The following are the types of logical operators. 以下是逻辑运算符的类型 。…c语言中的逻辑运算符 逻辑运算符 (Logical Operators) Logical operators are used to check the combinations of the two conditional expressions. 逻辑运算符用于检查两个条件表达式的组合。 The following are the types of logical operators. 以下是逻辑运算符的类型 。 Logical AND () Operator 逻辑AND( )运算符 Logical OR (||) Operator 逻辑OR( || )运算符 Logical NOT (!) Operator 逻辑NOT( )运算符 1)逻辑AND()运算符 (1) Logical AND () Operator) Logical AND operator represented by the symbols , it works with two operands and returns 1 if both operands are true (non-zero); 0, otherwise. 逻辑AND运算符由符号“ ”表示它与两个操作数一起使用如果两个操作数均为true(非零)则返回1否则返回1。 0否则。 Note: Operands can be values, conditions, expressions, etc. 注意 操作数可以是值条件表达式等。 Syntax: 句法 operand1 operand2 Truth table: 真相表 operand1operand2operand1 operand2Non-zeroNon-zero1Non-zero000Non-zero0000 操作数1 操作数2 操作数1 操作数2 非零 非零 1个 非零 0 0 0 非零 0 0 0 0 C program to demonstrate the example of logical AND () operator C 程序演示逻辑AND()运算符的示例 #include iostream using namespace std; int main() { int a 10; int b 20; // printing the values cout a : a endl; cout b : b endl; cout endl; // Logical AND operations cout (a b) : (a b) endl; cout (a 0) : (a 0) endl; cout (0 b) : (0 b) endl; cout (0 0) : (0 0) endl; cout endl; cout (a 10 b 30) : (a 10 b 30) endl; cout (a 10 b 20) : (a 10 b 20) endl; cout (a 10 b 30) : (a 10 b 30) endl; cout (a 10 b 20) : (a 10 b 20) endl; return 0; } Output: 输出 a : 10 b : 20 (a b) : 1 (a 0) : 0 (0 b) : 0 (0 0) : 0 (a 10 b 30) : 1 (a 10 b 20) : 1 (a 10 b 30) : 0 (a 10 b 20) : 0 2)逻辑或(||)运算符 (2) Logical OR (||) Operator) Logical OR operator represented with the symbols ||, it works with two operands and returns 1 if one (or both) operands are true (non-zero); 0, otherwise. 用符号“ || ”表示的逻辑“或”运算符 可用于两个操作数如果一个(或两个)操作数为真(非零)则返回1否则返回1。 0否则。 Syntax: 句法 operand1 || operand2 Truth table: 真相表 operand1operand2operand1 operand2Non-zeroNon-zero1Non-zero010Non-zero1000 操作数1 操作数2 操作数1 操作数2 非零 非零 1个 非零 0 1个 0 非零 1个 0 0 0 C program to demonstrate the example of logical OR (||) operator C 程序演示逻辑OR(||)运算符的示例 #include iostream using namespace std; int main() { int a 10; int b 20; // printing the values cout a : a endl; cout b : b endl; cout endl; // Logical OR operations cout (a || b) : (a || b) endl; cout (a || 0) : (a || 0) endl; cout (0 || b) : (0 || b) endl; cout (0 || 0) : (0 || 0) endl; cout endl; cout (a 10 || b 30) : (a 10 || b 30) endl; cout (a 10 || b 20) : (a 10 || b 20) endl; cout (a 10 || b 30) : (a 10 || b 30) endl; cout (a 10 || b 20) : (a 10 || b 20) endl; return 0; } Output: 输出 a : 10 b : 20 (a || b) : 1 (a || 0) : 1 (0 || b) : 1 (0 || 0) : 0 (a 10 || b 30) : 1 (a 10 || b 20) : 1 (a 10 || b 30) : 1 (a 10 || b 20) : 0 3)逻辑非()运算符 (3) Logical NOT (!) Operator) Logical NOT operator represented by the symbols !, it works with one operand and returns 1 if the operand is zero;0, otherwise. 逻辑NOT运算符以符号“ ”表示它与一个操作数一起使用如果操作数为零则返回1否则返回0。 Syntax: 句法 !operand Truth table: 真相表 operand!operandNon-zero001 操作数 operand 非零 0 0 1个 C program to demonstrate the example of logical NOT (!) operator C 程序演示逻辑NOT()运算符的示例 #include iostream using namespace std; int main() { int a 10; int b 0; // printing the values cout a : a endl; cout b : b endl; cout endl; cout !a : !a endl; cout !b : !b endl; cout endl; // Logical NOT operations cout !(a || b) : !(a || b) endl; cout !(a || 0) : !(a || 0) endl; cout !(0 || b) : !(0 || b) endl; cout !(0 || 0) : !(0 || 0) endl; cout endl; cout !(a 10 || b 30) : !(a 10 || b 30) endl; cout !(a 10 || b 20) : !(a 10 || b 20) endl; cout !(a 10 || b 30) : !(a 10 || b 30) endl; cout !(a 10 || b 20) : !(a 10 || b 20) endl; return 0; } Output: 输出 a : 10 b : 0 !a : 0 !b : 1 !(a || b) : 0 !(a || 0) : 0 !(0 || b) : 1 !(0 || 0) : 1 !(a 10 || b 30) : 0 !(a 10 || b 20) : 0 !(a 10 || b 30) : 0 !(a 10 || b 20) : 0 Recommended posts 推荐的帖子 Assignments Operators in C/C C / C 中的赋值运算符 Relational Operators in C/C C / C 中的关系运算符 Pre-increment and Post-increment Operators in C/C C / C 中的预增和后增运算符 sizeof() Operator Operands in C programming C 编程中的sizeof()运算符操作数 C Alternative Operator Representations C 替代运算符表示 C Operatots (new, delete, ) C Operatots(新增删除) What is the value of sizeof(x) and type of character literals in C? C 中sizeof(x)的值和字符文字的类型是什么 Difference between new and malloc() in C C 中的new和malloc()之间的区别 Difference between delete and free() in C C 中delete和free()之间的区别 翻译自: https://www.includehelp.com/cpp-tutorial/logical-operators-in-c-cpp.aspxc语言中的逻辑运算符
http://www.zqtcl.cn/news/899697/

相关文章:

  • 南宁小程序开发网站建设公司网络营销方案设计范文
  • 电脑做网站主机空间哈尔滨人才招聘信息网
  • 无锡网站建设制作设计wordpress news list
  • 专业建站教程青海 网站开发 图灵
  • 济南网站公司哪家好中国建设银行电脑版
  • 企业网站建设定制网站建设成功案例怎么写
  • 一个网站做数据维护3天正常吗做sgs认证公司网站
  • 免费网络短剧网站摄影素材库网站
  • 如何做竞价网站数据监控网站建设企业的市场分析
  • 电脑做网站主机空间软件开发工作岗位
  • 计算机多媒体辅助教学网站开发响应式网站建设精英
  • 免费网站空间怎么做网站主持人
  • 开源建站系统有哪些网站信息化建设合同
  • 昆明云南微网站淄博专业网站建设
  • 古典网站源码海南app开发
  • 自己做网站前期困难吗怎么早网站上放广告
  • 建设银行招标网站南昌网站建设公司信息
  • 网站建设与管理专业介绍湖南长沙邮政编码
  • 社区论坛系统免费开源seo网站诊断报告
  • 网站LOGO透明底色PNG格式怎么做的开发一款游戏需要多少资金
  • 网站推广营销策略北京东直门网站建设
  • 制作公司网站需要购买域名和服务器吗聊城做企业网站
  • 大连网站建设价格低做校招的网站有哪些
  • 电脑端网站和手机网站区别做的好的营销型网站有哪些内容
  • 长沙市做网站网站建设 全是乱码
  • ps做网站原形系统学做网站
  • 接网站 建设wordpress 打开慢 google
  • wordpress 移动 建站网站前台如何做访问量显示
  • 公司做网站买域名之后做什么打鱼网站开发
  • 南京市城乡建设局网站二级建造师证件查询