# PDF Archive

Easily share your PDF documents with your contacts, on the Web and Social Networks.

## DEVRY CIS 115 Final Exam 2.pdf

Page 1 2 3 4 5

#### Text preview

Declare _____ countyCode
_____ “Enter the county code: “
_____ countyCode
If _____ &lt;= 10=&quot;&quot;&gt;
Set
Else
If _____ AND _____ then
Set
Else
_____
EndIf
_____
Display “the sales tax is: “ + _____
End (Points : 10)
5. (TCO 5 &amp; 10) Complete the pseudocode by rewriting the algorithm. The design is to
display a 60-second countdown.
Begin
Declare _____ count
Set
REPEAT
Display “countdown: “ + _____
Set - 1
UNTIL _____
EndDo
Display “LIFT OFF!”
End (Points : 10)
6. (TCO 4, 5 &amp; 10) Complete the pseudocode by rewriting the algorithm. The colors red,
blue, and yellow are known as primary colors because they cannot be made by mixing
other colors. When you mix two primary colors, you get a secondary color. Mixing yellow
and blue gets you green. Mixing red and blue gets you purple. The algorithm allows the
user to enter two primary colors and then displays the resulting secondary color. The
colors entered by the user will be validated to ensure they entered a primary color.
Begin
Declare String color1
Declare String color2
Declare String control1
Declare String control2
_____ “Enter first primary color: “
Input _____
Prompt “Enter the second primary color: “
Input _____
Set control1 = “n”
DOWHILE control1 = “n”
If (color1 &lt;&gt; “yellow”) _____ (color1 &lt;&gt; “red”) _____ (color1 &lt;&gt; “blue”) then
Prompt “first primary color is invalid”
Input _____