This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Name: Kassem Mustafa Kassem Bagher C5 ID: 0713600 (Please email this document file with the answers to your instructor before Dec 26, 2007 to get the extra points) 1. There are three kinds of errors defined in the book syntax errors, run-time errors, and logic errors- can occur. Give one example about the syntax error and another example about the run- time error. Syntax Error (Example): printf(%d,x) Run-Time Error (Example): int x; Printf(%d,x); Since x has no value it will give a run-time error. 2. Draw the flow diagram to compute the payroll for 5 employees in a company during a week. Each employee can work only 80 hours during the week. If an employee works more than 80 hours during the week, the company will not pay for the extra hours. Also, each employee is to be paid time and a half (150%) for all hours worked over 40. A tax amount of 3.625 percent will be deducted. The program output should display the payroll for each employee, in addition to, the total payroll and the average amount paid at the end of the run. (Note: start draw the flow diagram from the loop condition.) # include...
View Full Document
This note was uploaded on 01/15/2011 for the course FCIT 202 taught by Professor Danial during the Spring '07 term at King Abdulaziz University.
- Spring '07