KRHS Internet Lesson

Teacher Name:Mr. Rung                          Date of Lesson: November

Course Name: C++                    Lesson Name: Chap 7.1c

Student Name

Password


Objective
Complete the workbook problems.


Primary Focus
Section 7.1 Fill in section.

Site Links
KRHS

Additional Resources
Write your answer in the space following each question or statement

Site Links


Question #1

Write an expression that returns the numeric equivalent of true if the value in the variable m is 44 or less.


Question #2

Write an expression that returns the numeric equivalent of true if the value in the variable t is greater than 50 and is less than 100.


Question #3

Write an expression that returns the numeric equivalent of false if the value in R is greater than 17.


Question #4

What will be the value returned by the following expression?

(!((2>3)|| (5==5)&&(7>1)&&(4<15) || (35<="36)&&(89!=34)));"


Question #5

Explain how you can use short circuit evaluation with the expression in question 4 above to arrive at the correct answer without evaluating the entire expression.


Question #6

Write an expression that will return false if the value in g is not equal to 34.


Question #7

Write a statement that will determine if a given integer in a variable named j is an even number and store the result in a variable named is_even. The variable is_even should be 0 if the number in j is odd and something other than 0 if the number is even.


Question #8

Write a complete program that incorporates the statement you wrote in question 6.