ravisunny2
Posts: 1,053 +11
In the monthly (?) publication of Tau Beta Pi, there used to be brain teasers.
Some of them were really good (they really messed up your brain),
Snehal, are still enjoying them ?
Since the users on this site are mostly techies, maybe a forum could be set up for Brain Teasers.
But here's one for the serious programmers.
Suppose you have a hollow aluminum cylinder (open at the top), say 'x' inches ID. Place a solid (right circular) aluminum cylinder, dia 'y' aprox. half of 'x', in the center of the hollow one, flat face down.
Now gently pour mercury into the hollow cylinder, without wobbling the sold one. At what level of mercury will the solid cylinder just rise ?
Usefull formulas :
A=pi*r^2, V = A* h, W = mg
Buoyant force = weight of the fluid displaced.
What bells & whistles need to be put into the program ?
Some of them were really good (they really messed up your brain),
Snehal, are still enjoying them ?
Since the users on this site are mostly techies, maybe a forum could be set up for Brain Teasers.
But here's one for the serious programmers.
Suppose you have a hollow aluminum cylinder (open at the top), say 'x' inches ID. Place a solid (right circular) aluminum cylinder, dia 'y' aprox. half of 'x', in the center of the hollow one, flat face down.
Now gently pour mercury into the hollow cylinder, without wobbling the sold one. At what level of mercury will the solid cylinder just rise ?
Usefull formulas :
A=pi*r^2, V = A* h, W = mg
Buoyant force = weight of the fluid displaced.
What bells & whistles need to be put into the program ?