KRHS Internet Lesson

Teacher Name:Mr. Rung                          Date of Lesson: November

Course Name: C++                    Lesson Name: Chap 7.2b

Student Name

Password


Objective
Complete section 2 of chapter 7 in the workbook


Primary Focus
Please fill in the answer in the space provided.

Site Links

Additional Resources

Site Links


Question #1

Write an if/else structure that prints the words Password Correct to the screen if the int variable PASSWORD
is equal to 32345 and will print to screen Password Incorrect otherwise.


Question #2

Write a structure that prints the words You Win! to the screen if the variable Win_Lose is equal to one.


Question #3

Write a structure that will print Number not in range to the screen if the variable input is not in the range of 10 to 15.


Question #4

Write a structure that will print Answer Incorrect to the screen if the char variable Answer is not equal to A.


Question #5

Look at the structure below. If iNum = 100, what will print to the screen?
if(iNum >50 ||iNum<75)
cout “Number is in range”;
else
cout “Number out of range”;

Output to the screen is ______________________________


Question #6

Is there any value of iNum that can make the structure in question 5 above report that the number is out of
range? Explain your answer.