CS 1112 Lecture Notes - Lecture 22: Boolean Expression, Semicolon, Matlab

18 views2 pages

Document Summary

; (semi-colon) suppresses printing of the result of assignment statement. Relational operators: i. e. x = y (x gets y) ~= (not equal to) statements to execute if expression is true statements to execute if expression is false fprintf ( variable") will display the string variable fprintf (variable) will display the value of the variable variable . Types of if construct: if (boolean expression) else end. Can have any number of elseif branches but at most one else branch. The else clause does not have a condition. Short-circuits to false if the left operand. Short-circuits to true if the left operand evaluates to false evaluates to true. Both conditions must be true to evaluate to. One condition must be true in order to true. Top-down design evaluate to true: state problem, define inputs and outputs, design algorithm = decomposition + stepwise refinement, convert algorithm to program, test and debug. Some steps are repeated; these steps form the loop body.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents