# Chapter 2 - Exercises - Page 87: 11

Step 1 Set value for Gross to 0 Step 2 Set value for Answer to $Y e s$ Step 3 While (Answer =Yes) do Steps 4 through 10 Step 4 Read in value for Hours Step 5 Read in value for Rate Step 6 If $(\text {Hours} \leq 40)$ then add (Hours. Rate) to Gross $\quad$else Step 7 If $(\text {Hours}>40)$ and (Hours $\leq 54 )$ then $\quad$$\quad$$\quad$add Rate $\cdot(40+1.5 \cdot(\text { Hours }-40))$ to Gross $\quad$else Step 8 If $(\text {Hours}>54)$ then $$\text { add Rate } \cdot(40+1.5 \cdot 14+2 \cdot(\text { Hours }-54)) \text { to Gross }$$ Step 9 Print value of Gross Step 10 Print "Would you like another computation?" and read the value for Answer Step 11 Stop

#### Work Step by Step

--

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.