c++ cdi+示例

"not" is an inbuilt keyword that has been around since at least C++98. It is an alternative to ! (Logical NOT) operator and it mostly uses with the conditions.

“ not”是一个内置关键字,至少从C ++ 98起就存在。 它是替代! ( 逻辑非 )运算符,它通常与条件一起使用。

The not keyword returns 1 if the result of the given condition is 0, and it returns 0 if the result of the given condition is 1.

如果给定条件的结果为0,则not关键字返回1;如果给定条件的结果为1,则not返回0。

Syntax:

句法:

    not operand;

Here, operand is the operand.

在此, 操作数是操作数。

Example:

例:

    Input:
a = 10;
b = 20;
result = not(a < b);
Output:
result = 1

C ++示例演示“ not”关键字的用法 (C++ example to demonstrate the use of "not" keyword)

// C++ example to demonstrate the use of
// 'not' operator.
#include <iostream>
using namespace std;
int main()
{int num = 20;
if (not(num >= 10 and num <= 50))
cout << "true\n";
else
cout << "false\n";
if (not(num >= 20 and num <= 50))
cout << "true\n";
else
cout << "false\n";
if (not(num > 50 and num <= 100))
cout << "true\n";
else
cout << "false\n";
return 0;
}

Output:

输出:

false
false
true

翻译自: https://www.includehelp.com/cpp-tutorial/not-keyword-with-example.aspx

c++ cdi+示例

c++ cdi+示例_C ++'not'关键字和示例相关推荐

  1. c++ cdi+示例_C ++“和”关键字示例

    c++ cdi+示例 "and" is an inbuilt keyword that has been around since at least C++98. It is an ...

  2. c++ cdi+示例_C ++“或”关键字示例

    c++ cdi+示例 "or" is an inbuilt keyword that has been around since at least C++98. It is an ...

  3. c语言 函数的参数传递示例_C语言中带有示例的remove()函数

    c语言 函数的参数传递示例 C语言中的remove()函数 (remove() function in C) The remove() function is defined in the <s ...

  4. c#中的long类型示例_C#中带示例的带符号字节数组

    c#中的long类型示例 C#中的有符号字节数组 (Signed Byte Array in C#) In C#.Net, we can create a signed byte array by u ...

  5. c#中的long类型示例_C#中带示例的无符号字节数组

    c#中的long类型示例 C#中的无符号字节数组 (Unsigned Byte Array in C#) In C#.Net, we can create an unsigned byte array ...

  6. boost::log模块使用属性关键字的示例

    boost::log模块使用属性关键字的示例 实现功能 C++实现代码 实现功能 boost::log模块使用属性关键字的示例 C++实现代码 #include <iostream> #i ...

  7. 关键字驱动测试示例_带有示例的False关键字

    关键字驱动测试示例 Python False关键字 (Python False keyword) False is a keyword (case-sensitive) in python, it i ...

  8. scala语言示例_标有示例的Scala关键字

    scala语言示例 Scala | 任一关键字 (Scala | Either Keyword) Either is a container similar to the option which h ...

  9. python 示例_Python中带有示例的class关键字

    python 示例 Python类关键字 (Python class keyword) class is a keyword (case-sensitive) in python, it is use ...

最新文章

  1. 细数技术指标-[转载]
  2. Scrum敏捷开发工具Leangoo
  3. 深度2万字好文:图像处理-基于 PyTorch 的 YOLO v5 表情识别(附源代码)
  4. 八代i7装服务器系统2012,八代I7能装win7系统吗,会影响性能吗-8代win7,8代cpu完美装win7...
  5. 你真的会读datasheet吗?
  6. element 怎么把数据写到日历表上_数据集 | 地理空间数据云30m的DEM爬取
  7. dicom格式怎么转换_qsv怎么转换mp4格式?qsv转mp4的首选工具
  8. CCF NOI1098 森林
  9. Windows服务程序
  10. UVa 714 抄书(贪心+二分)
  11. leetcode之字符串中的第一个唯一字符
  12. 前端 docker + gitlab CI 的持续集成(二)
  13. 软件项目管理期末复习题
  14. android 实现qq动画,Android实现仿QQ登录界面背景动画效果
  15. 点餐App火爆背后的冷思考
  16. 一个简单购物网页的制作过程
  17. HDU 3313 Key Vertex 胡搞(网络流最小割拆点什么的人家才不会呢)
  18. Django作业管理系统(1)
  19. 另眼看待王老吉 弱品类市场需要强场景突破
  20. 【PM 产品】产品经理的思维方式

热门文章

  1. java 数学表达式解析插件_数学表达式解析-JAVA版
  2. java中菜单分几级_JavaWeb三级菜单分类查询详解
  3. java用redis缓存的步骤_详解在Java程序中运用Redis缓存对象的方法|chu
  4. 使用aggregate在MongoDB中查找重复的数据记录
  5. Web 开发中 Blob 与 FileAPI 使用简述
  6. CSS3中的圆角边框属性详解(border-radius属性)
  7. 利用css transition属性实现一个带动画显隐的微信小程序部件
  8. React使用的扩展
  9. 统计一个panel中lable的个数
  10. 23种计模式之Python实现(史上最全最通俗易懂)内容整改中