How do subroutines help in program writing?
Some of the significant characteristics of
Subroutine that help in program writing are:
- A subroutine is named, each have a unique name. By using that name in another part of the program, one can execute the statements contained in the subroutine.
- A subroutine is independent that can perform its task without interference from or interfering with other parts of the program.
- A subroutine performs a specific task. A task is a discrete job that a program must perform as part of its overall operation, like as sending a line of text to a printer, sorting an array into numerical order, or measuring a cube root.