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

Home > Just Math
Quadratic and Linear (Posted on 2016-08-03) Difficulty: 3 of 5
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

See The Solution Submitted by K Sengupta    
No Rating

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


Private Sub Form_Load()
 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
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 (11)
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