Sunday, March 1, 2009

Puzzle 2 - Solution

The key to solving this problem are 'Integer arithmetic always gives an Integer' and 'Floating arithmetic takes precedence over Integer arithmetic'.
The steps in which the above operation will perform are,

Step 1 – Multiple 2.0 with 2 = 4.0
Step 2 – Divide 4.0 by 4 = 1.0
Step 3 – Divide 2 by 4 = 0
Step 4 – Add 1.0 and 0 = 1.0

The answer to Puzzle 2 is 1.0

Sorry no correct answers this week!

No comments:

Post a Comment

Solution for this question?