All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Finding the maximum (Posted on 2004-04-21)
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.)

 See The Solution Submitted by e.g. Rating: 4.0000 (5 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 puzzle solution Comment 16 of 16 |

The required fuction is given in terms of the variable Y as follows:

Y = (X + R + ABS(X-R)/2, where:

X = (P + Q + ABS(P-Q))/2

` `

 Posted by K Sengupta on 2007-04-15 15:25:48
Please log in:
 Login: Password: Remember me: Sign up! | Forgot password

 Search: Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2019 by Animus Pactum Consulting. All rights reserved. Privacy Information