Question: 1 of 4 Lab 5 - CMPS 1044 - Computer Science ! If/Else Statements & Nested If/Else Statements Objectives: Demonstrate use of decision operator if



1 of 4 Lab 5 - CMPS 1044 - Computer Science ! If/Else Statements & Nested If/Else Statements Objectives: Demonstrate use of decision operator if in a variety of problem scenarios. Demonstrate use of relational operators. Relational Operator: Operator that allows comparison of values to determine the following less than greater than less than or equal to greater than or equal to equal to not equal to The result of a relational operator is a Boolean value true or false. Decision Statements: Statements that allow execution under various circumstances. ifis one of the Decision Statements. if (condition) // When condition represents a true statement, // Statement Set 1 will be executed. Statement set 1; } else // When condition represents a false statement, { 1/ Statement Set 2 will be executed. Statement set 2; ) Open a new project and type in the following example: #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
