This smells like homework, so I'll only give you pseudo-code:
decimal returnLargest(decimal a, decimal b)
is a > b ? then, return a, else, return b;
The function already exists in PHP and is even called max(); Otherwise use: function max ($one, $two) { return $one > $two ? $one : $two; }
Function calling is where your code branches off to execute a function and then returns to the instruction following the call. The function may also return a value that can be stored and/or processed by the code that called it. Functions allow common code to be separated from the code that uses the common code, thus reducing maintenance (the code in the function is written once, rather than every time it is required).
strlen is the C library function that accepts a pointer to a char array and returns an integer specifying the number of characters (in bytes) of the array. This function is usually not used any more, because it does not support multi-byte characters, such as UTF-8.
void printStarts (void);
int find(String str, double d);
float test(int, char);
The function already exists in PHP and is even called max(); Otherwise use: function max ($one, $two) { return $one > $two ? $one : $two; }
Function calling is where your code branches off to execute a function and then returns to the instruction following the call. The function may also return a value that can be stored and/or processed by the code that called it. Functions allow common code to be separated from the code that uses the common code, thus reducing maintenance (the code in the function is written once, rather than every time it is required).
strlen is the C library function that accepts a pointer to a char array and returns an integer specifying the number of characters (in bytes) of the array. This function is usually not used any more, because it does not support multi-byte characters, such as UTF-8.
void printStarts (void);
int find(String str, double d);
When a function declares it returns void, it means it does not return anything. Sometimes the function doesn't need to return anything, so using void is convenient. In C: using voidinstead of parameters means 'there's no parameters'
double calcAreaRect (double a, double b);
The "plus sign" (+) is an operator that, by default, takes the left and right operands as parameters, and returns the sum of both operands as the return value.
Not necessarily. A function that accepts one or more arguments may process those arguments but need not return any value to the caller. In this case the function simply returns void.
int comp(const int a1[], const int a2[], const int size) { int i; for(i = 0; i < size; ++i) { if(a1[i] != a2[i]) { return 0; } } return 1; }
A __________ function takes the exponential function's output and returns the exponential function's input.