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

 Quadratic and Linear (Posted on 2016-08-03)
Find all possible triplets (A,B,C) of positive integers satisfying this system of simultaneous equations:
• A2 + B2 - C2 = A+B-C, and:
• A+B+C = 82

 No Solution Yet Submitted by K Sengupta No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution | Comment 1 of 2
DefDbl A-Z
Dim crlf\$

Form1.Visible = True

Text1.Text = ""
crlf = Chr\$(13) + Chr\$(10)

For c = 1 To 80
ab = 82 - c
For a = 1 To ab / 2
b = ab - a
lhs = a * a + b * b - c * c
rhs = a + b - c
If lhs = rhs Then
Text1.Text = Text1.Text & a & Str(b) & Str(c) & crlf
End If
Next
Next

Text1.Text = Text1.Text & crlf & " done"

End Sub

finds only two basic solutions:

``` a  b  c
21 27 34 9 36 37```

as the program put a and b in ascending order.  Of course they could be reversed.

 Posted by Charlie on 2016-08-03 10:32:48

 Search: Search body:
Forums (0)