- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
ExpressionReview.ppt
Expression Review what is the result and type of these expressions? int x=2, y=15; double u=2.0, v=15.0; -x x+y x-y x*v y / x x/y y%x x%y u*v u/v v/u u%v x * u (x+y)*u u /(x-x) x++; u++; u = --x; u = x--; u *= ++x; v /= x; * Constants and Variables Review are these constants legal? .5 5.E 0.5e3 0.5E-3 0.5E-3.5 ’a’ ’%’ ’Ab’ ”Ab” are these variable names legal? MyTotal My_Total __MyTotal My Total what does this mean? int mytotal=0; int yourtotal(1); what would be stored in myvar? int myvar; myvar=2.56; is this code correct? const int i=55; ++i; * what would be stored in yourvar? double yourvar; yourvar=5/2; Logical Expressions, IF Boolean Algebra Boolean (logical) expressions can have two values true or false branch of mathematics that deals with this type of logic is called Boolean algebra developed by British mathematician George Boole in the 19th century logical operators in C++ - logical “and”, binary || - logical “or”, binary ! - logical “not”, unary * Truth Table for truth table - lists all combinations of operand values and the result of the operator for each combination truth table for (logical “and’) p q p q false false false false true false true false false true true true * Truth Tables for II and ! p q p || q false false false false true true true false true true true true * p !p false true true false Boolean Algebra can create complex logical expressions by combining with subexpressions example ! (p q) a truth table can be used to determine when a logical expression is true note that and | are also legal operators, make sure to use correct ones p q p q !(p q) false false false true false true false true true false false true true true true false * Example Logical Expressions bool p = true;bool q = false;bool r = true;bool s = p q; bool t = p !q bool u = !q || r; bool v = p || !q || !r; bool w = p q !r; bool
您可能关注的文档
- CSS3304SmallGroupCommunication.doc
- css全教程字体和文本.ppt
- CULTURE,PartII.ppt
- CurrentLiabilitiesandContingencies.ppt
- CZC2016116投标报价书.doc
- CZC2016119项目明细价格表.doc
- C语言跨平台快速入门.ppt
- DataFlowAnalysisFoundations.ppt
- DealingwithRESEARCHMISCONDUCT.ppt
- DECISIONMODELINGWITHMICROSOFTEXCEL.ppt
- ExtractingRisk-NeutralDensitiesfromOptionPricesusing.ppt
- February2010CPIFanChart.ppt
- Figure3.ck2isneededforgrksignaling.ppt
- FMRIDataAnalysisPrinciples&Practice.ppt
- FMS100INTRODUCTIONTOFILM.doc
- Folk-customsinJinzhou.docx
- FORMALLANGUAGES,AUTOMATAANDCOMPUTABILITY.ppt
- Fromlittlethings…..Howsmallchangescanmakeabig.ppt
- G350垫江县澄溪至四川邻水界段公路改造工程路基施工项目.doc
- GENERALCHARACTERISTICSOFTHETHERMAL.ppt
最近下载
- 2011东山县科目一考试货车仿真试题.doc VIP
- 风电场35kv集电线路箱变安装施工组织设计.pdf VIP
- 2023年06月国家国防科技工业局核技术支持中心社会招考聘用笔试历年难、易错考点试题含答案解析.docx
- 2025年人教版初中物理八年级上册第二章《声现象》单元测试题(含答案).pdf VIP
- 2025年度地质勘探钻井服务外包合同.docx VIP
- 2023年新疆职业大学招聘笔试真题带答案详解.docx VIP
- 2023风电场35kv集电线路箱变安装施工方案.docx VIP
- 沪粤版九年级上册 第十三章《探究简单电路》单元测试卷.doc VIP
- 温室气体(GHG)管理手册.doc VIP
- 2025年新疆能源(集团)石油天然气有限责任公司招聘笔试参考题库附带答案详解.pdf
文档评论(0)