首页 > 其他 > 详细

bool型数据演示

时间:2019-12-20 13:52:17      阅读:76      评论:0      收藏:0      [点我收藏+]
//this program dispiay te ahlphabet
#include <iostream>
using namespace std;
int main()
{
    bool b;
 b = false;
 cout<<"b is"<<b<<"\n";
 
 b = true;
 cout<<"b is"<<b<<"\n";
 
 //a bool value can control the if statement
 if(b)cout<<"this is executed.\n";
 
 b = false;
 if(b)cout<<"this is not executed.\n";
 
//outcome of a relational operator is a true/false value
cout<<"10>9 is"<<(10>9)<<"\n";
 
 
   return 0;
}

bool型数据演示

原文:https://www.cnblogs.com/40630762-/p/12072452.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!