Hello to all,
Does anyone know of a C function that will take the max value from a collection of arguments,
for instance,
{ s(j-1,k)
s(j,k) = max { s(j,k-1)
{s(j-1,k-1)
Any suggestions would be great
Printable View
Hello to all,
Does anyone know of a C function that will take the max value from a collection of arguments,
for instance,
{ s(j-1,k)
s(j,k) = max { s(j,k-1)
{s(j-1,k-1)
Any suggestions would be great
Once you write one, there will be one.
is there a standard function for computing max; such as strlen and strstr are standard functions?
thanks. Any advice on how to start my own subroutine that will take the max from 3 arguments?
I would start it like this:
It should probably have four if statements in it. Edit: Or, alternatively, two calls to fmax.Code:double max_three(double x, double y, double z)
If you plan to do three, and four, and five, etc.... then maybe you should look at taking the maximum of an arbitrary number of elements (passed in as a parameter, of course).