factorial(n=4)
and can be represented as follow:And this representation can be specified by a C
program as:
int fact(int n) { // sub-program declaration
int r;
...
return r;
}
A program with no parameter and no result (void
) such as the main
program will be declared as follow:
void main() {
...
}