Subroutine and functions, Basic Computer Science

Assignment Help:

Subroutine and Functions:

 In a program, it is often necessary to repeat a statement or group of statements at several points to accomplish a particular task. Repeating the same statement in a program each time makes a program lengthy and reduces readability. These problems could be sorted out if the necessary statements could be written once and then referred to each time they are needed. This is the purpose of a subprogram. Basically there are two different types of subprograms, called functions and subroutines.  Making subprograms allows tackling small pieces of a problem individually. 

Once each piece is working correctly then the pieces are integrated together to create the complete solution of the problem. To implement functions and subroutines, we require writing the main program that references all of the subprograms in the desired order and also writing the subprograms. This can  be done in any order that is convenient. 


Related Discussions:- Subroutine and functions

Probability, Mike sells on the average 15 newspapers per week (Monday – Fri...

Mike sells on the average 15 newspapers per week (Monday – Friday). Find the probability that 2.1 In a given week he will sell all the newspapers [7] 2.2 In a given day he will sel

Flowchart, i need help with flowcharting a procedure

i need help with flowcharting a procedure

Internet searching, Internet searching:  The Internet consists of mill...

Internet searching:  The Internet consists of millions of private/public/academic/business and government networks having local to global scope. It has billions of web pages o

Enterprise collaboration system, what is the goals of enterprise collaborat...

what is the goals of enterprise collaboration system?

Types of policy, want to get detail understanding of the types of security ...

want to get detail understanding of the types of security policies including enterprise security policy, issues specific policies etc

Command processor and user interface, Command Processor and User Interface:...

Command Processor and User Interface: To the user, the most important and visible services provided by the OS is the user interface and the capabilities that it provides to ex

Port in a computer, what is the need of a port in a computer?

what is the need of a port in a computer?

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd