Section 11: Branching and Looping173
To run TAX to compute on incomes of $38,000 and $7,600:
Keystrokes Display    
PRGM 
  0.0000    
  Takes the HP-41C out of PRGM mode.
XEQ 
       
   
ALPHA TAX ALPHA 
  INCOME?    
  The prompt for the income.
38000 
  38,000 _    
   
R/S 
  8,360.0000    
  The tax at 22%.
XEQ 
       
   
ALPHA TAX ALPHA 
  INCOME?    
   
7600 
  7,600 _    
   
R/S 
  1,330.0000    
  The tax at 17.5%.
g CLX 
  0.0000    
   
Problems:
  1. Write a program that will calculate the arc sine (that is, sin –1) of a value that has been keyed into the X-register. Test the resulting angle with a conditional, and if it is negative or zero, add 360 degrees to make the angle positive. Use the flowchart below to help you write the program.
    Run the program to find the arc sine of –7; of 0.5.
    (Answers: 315.5730; 30.0000.)
            
Start
         
                       
         
Calculate arc
sine of x
         
                       
     
Yes
Yes
Yes
Yes
Is
arc sine
greater than
zero?
No
No
No
No
     
         
                 
Add 360 degrees
 
                         
                         
                       
         
Stop