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: and take note of what would happen. When we run this program: Line 1 prints Enter Salary Lets say the user types in, 600 then variable sal will be set equal to 600 We see that the condition in the line 4 if statement will be true. Because 600 is less than 1500 So the computer will multiply sal * .15 OR (600 * .15) so the answer is 90. the computer sets the variable tax = 90 We can see that the condition in line 7 line 10 line 13 and line 16 is not true so nothing happens. Line 20 prints out: The tax is 90 The screen on your computer would look like this: Enter salary 600. The tax is 90....
View Full Document
This note was uploaded on 05/01/2010 for the course AAIT IT 210 taught by Professor Yurik during the Spring '10 term at University of Phoenix.
- Spring '10