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

Home > Just Math
Simultaneous Pythagorean Poser 2 (Posted on 2015-09-05) Difficulty: 3 of 5
Find all possible triplets (A, B, C) of positive integers, with A ≤ B, that satisfy this system of equations:

A2 + B2 = C2, and

A+B = 2C - 99

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.)
computer solution | Comment 1 of 4
The error below was caused by reusing code from the original Pythagorean Poser puzzle and neglecting to change one of the lines. Thanks to xdog for spotting this ridiculous error.


DefDbl A-Z
Dim crlf$


Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)

 For tot = 2 To 50000
  For a = 1 To tot / 2
   b = tot - a
   c = tot - 12
   If a * a + b * b = c * c Then
       Text1.Text = Text1.Text & a & Str(b) & "   " & c & crlf
       DoEvents
   End If
  Next
 Next
 
 
 Text1.Text = Text1.Text & crlf & " done"
  
End Sub

lists

a   b    c
3 4   -5      *
20 21   29
18 24   30
16 30   34
15 36   39
14 48   50
13 84   85

* Ignore the first row, as the program didn't check to make sure c was positive


Edited on September 6, 2015, 8:47 am

Edited on September 6, 2015, 8:58 am
  Posted by Charlie on 2015-09-05 12:48:30

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