Professional Documents
Culture Documents
parameters
Output:
How wide is your yard? 100
How long is your yard? 200
Your yard is 20000 square feet
23: }
Statements
There is virtually no limit to the number or types of statements that
can be in a function body.
Although you can't define another function from within a function,
you can call a function, and main() does just that in nearly every
C++ program.
Although there is no limit to the size of a function in C++, well-
designed functions tend to be small.
Many programmers advise keeping your functions short enough to fit
on a single screen so that you can see the entire function at one time.
This is a rule of thumb, often broken by very good programmers, but
a smaller function is easier to understand and maintain.
Each function should carry out a single, easily understood task.
If your functions start getting large, look for places where you can
divide them into component tasks.