CIS-111 Introduction to Problem Solving & Computer Programming Sample Assignment (continued) examples for the Selection Structure: Pseudo-code Input First Second If = Second Print values are equal” “The Else values are not equal” “The End If End Input Hours Input Rate If Hours < 40 PayAmount = Hours * Rate Else PayAmount = 40 * Rate + (Hours 40) * Rate * 1.5 – End If Print amount due is PayAmount “Pay “, End Begin Input First Second If First = Second Print values are equal” “The Else If First < Second First, less than Second “is “, Else Print First, greater than Second “is “, End If End If End
CIS-111 Introduction to Problem Solving & Computer Programming Sample Assignment (continued) Pseudo-code examples for the Selection Structure: Input First Second If = Second Print “The values are equal” Else “The values are not equal” End If End Input Hours Input Rate If Hours < 40 PayAmount = Hours * Rate Else PayAmount = 40 * Rate + (Hours – 40) * Rate * 1.5 End If Print “Pay amount due is “, PayAmount End Begin Input First Second If First = Second Print “The values are equal” Else If First < Second First, “is less than “, Second Else Print First, “is greater than “, Second End If End If End
CIS_Self_Study_11-12.docx