2. Introduction to Function
What is function?
We can consider a function is a helping tool for programmer.
We use functions to perform subtask in the main program.
For example, in one program we can have multitask instead to perform all
Task in the main ().
We divide it on the small functions each one is responsible for specific task.
3. Why we need one?
Function help a programmer to trace the source code in efficient way.
It is better way for debugging.
If we have source code content more than 1000 line of code it will be difficult
To write such a program without using functions.
4. How to write Function?
There is two ways to write functions in c++ language.
First one, we can write the function before the manin ()
In this way we don’t need to declare it.
6. The second way to write Function
Is to write the function after the main() but in this case we need to declare it first.
Otherwise the IDE will give errour.