Using only standard math operators (+, , *, /) and functions (absolute value, square root, powers, and so on), give a function that calculates MAX(A,B,C).
Alternate version, for programmers only: using any language (BASIC, C, Excel, whatever) find the maximum of A, B, and C, but be careful when writing the program, because you cannot use the "" key, for it's broken (thus writing things like IF A>B is impossible...) and you cannot use the "M" key either, for it's also broken (...and writing H=MAX(A,B) is also not possible.)
(In reply to
re: programming solution by Ady TZIDON)
In the generic algorithms in C++, max() works something like
if (a > b) return a; else return b;
and is a template function that works on any data type, even usercreated ones, as long as the > and < comparison operators are overloaded for the type.

Posted by DJ
on 20040421 17:12:49 