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

Home > Just Math
Age of ages 3 (Posted on 2023-08-13) Difficulty: 3 of 5
  • Andy is as old as Bruce will be when Andy will be twice as old as Bruce was when Andy's age was half the sum of their present age.
  • Bruce is as old as Andy was when Bruce was half the age he will be 10 years from now.
Determine the respective present ages of each of Andy and Bruce.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
soln Comment 2 of 2 |
For fun, I did it a slightly different way, letting the 
computer do all the work. I identified 5 unknowns and 
5 equations, and then just ran a looping code. 

A and B are their present ages. The two "will be"s in the 
first sentence refer to the same future time, say, f years 
from the present. Likewise, in the first sentence the two 
"was"s refer to the same time p1 years in the past. 
The first sentence holds three equations:

A = B+f
A + f = 2(B - p1)
A - p1 = (A + B)/2

We are up to 3 equations and 4 unknowns.

The second sentence "was" refers to a different past time, 
say p2 years ago.

B = A - p2
B - p2 = (B + 10 )/2 
 

The code:
        program age
        implicit none
        integer A,B,f,p1,p2
        do A=1,100
          do B=1,100
            do f=1,100
              do p1=1,100
                do p2=1,100
        if(A.ne.B+f .or. A+f.ne.2*(B-p1) .or. 2*(A-p1).ne.A+B
        1 .or. B.ne.A-p2 .or. 2*(B-p2).ne.B+10) go to 1
        print*,'A B f p1 p2 ',A,B,f,p1,p2
1               enddo
              enddo
            enddo
          enddo
        enddo
        end
               
lord@rabbit 13158 % age            
 A B f p1 p2   40  30  10   5  10

  Posted by Steven Lord on 2023-08-13 23:57:37
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 (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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