This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: performed on the them. After the mathematical operations have been performed a various sequence of branches must be used to get to the different sub routines to print the number. The first branch braches if the result is positive, the second if it is negative and the third if it is zero. They branch to the respective subroutines which essentially do the same thing except tell if the number is positive, negative or zero. All of these subroutines branch to a final sub routine which uses a trap to prompt the user to see if they would like to continue and do another calculation. Conclusion This lab was effective at showing the trap and subroutine concepts purely because the lab is not possible without them. The program cannot print out the result without a subroutine. Nor can this program print, and/or read in numbers without the trap 15 function. Thus this lab is effective at getting the concepts across because without them it is impossible to do....
View Full Document
- Fall '07
- Subroutine, Control flow, Output devices, mathematical operations, different sub routines