|
|
|
Section 11: Branching and Looping173
|
|
To run TAX to compute on incomes of $38,000 and $7,600:
|
|
|
|
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.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Is
arc sine
greater than
zero?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|