CS 302 notes 5 - CS3025 WarmupExercises $8\/hrforthe first40hours,and$12\/ 1. ,andprintsthe totalpay 2. 3.Usingtheblackbox,writea

CS 302 notes 5 - CS3025 WarmupExercises $8/hrforthe...

This preview shows page 1 - 2 out of 2 pages.

CS 302 5 Warm up Exercises Consider an employee who works for $8/hr for thefirst 40 hours, and $12/hr for every hour over 40.1. Write an algorithm that is given the number ofhours the employee works in a week, and prints thetotal pay.2. Put the algorithm into a “black box”3. Using the black box, write an algorithm that isgiven the number of hours the employee worksevery week of the year – i.e. a list of 52 numbers –and prints the total pay for the yearGiven:OA letter template, such as:Dear <honorific> <surname>,The law abiding residents of <city> face a horrible threatfrom roving bands of skateboarders and other delinquents. Imwriting to you, <first>, to ask your help in cleansing <street>,and all of <city>, of this menace. One community at a time,lets take back the great state of <state>!surname first honorific street city stateBy separating the template from the database,We can change either one, and re-use the otherJonesSmithAdamsSarahMichaelJaniceDr.Mr.Ms.Austin
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read both pages?

  • Spring '08
  • J.Parker
  • Sarah, Given name, TI

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture