This preview shows pages 1–3. 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: Week 3 CheckPoint: Sequential and Selection Processing Control Structure Process: 1. Display program title 2. Display directions 3. Get the salary 4. Calculate the taxes 5. Output the results Input: Salary (real: Salary) Output: Total taxes (real: Taxes) Salary Input-Process-Output Chart Input Processes Output Salary (from keyboard) Get Salary Salary Salary Calculate Taxes Taxes Salary, Taxes Output Taxes Salary, Taxes (to display) Main Module Call input module Call perform calculations module Call output results module End program Pseudocode Main program Declare salary as real Declare taxes as real Call Get Salary Module Call Calculate Taxes Module Call Output Taxes Module End main module Get Salary Print Enter the Salary: Get Salary Get Salary Calculate Salary Declare Base_Tax as real Declare Excess as real Declare Rate as real if(Salary <= 0 OR Salary >= 15000.00) Display Invalid Salary Set Base_Tax = 0.0 Set Rate = 0.0 Set Excess = 0.0 else if(Salary <= 1499.99) Set Base_Tax = 0.0Set Base_Tax = 0....
View Full Document
- Spring '09
- Environmental Science