Manifesto: what CTK is about Search CTK Buying a book is a commitment to learning Table of content Things you can find on CTK Chronology of updates Email to Cut The Knot Recommend this page

CTK Exchange

Subject: "Algorithm"     Previous Topic | Next Topic
Printer-friendly copy     Email this topic to a friend    
Conferences The CTK Exchange Guest book Topic #610
Reading Topic #610
Hemanth Kumar
guest
Jun-07-06, 07:32 AM (EST)
 
"Algorithm"
 
   Please give me the algorithm to test whether the numbers represent the sides of a right angle triangle.


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top
alexb
Charter Member
2077 posts
Jun-07-06, 08:22 AM (EST)
Click to EMail alexb Click to send private message to alexb Click to view user profileClick to add this user to your buddy list  
1. "RE: Algorithm"
In response to message #0
 
   See

https://www.cut-the-knot.org/pythagoras/index.shtml


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top
sarathian
Member since Sep-14-07
Sep-15-07, 07:26 AM (EST)
Click to EMail sarathian Click to send private message to sarathian Click to view user profileClick to add this user to your buddy list  
2. "RE: Algorithm"
In response to message #0
 
Let m1, m2 and m3 be the three integers in ascending order
i.e.m1<m2<m3. Let p=(m1+m2+m3)/2
Let r = p-m3.
If (m1-r)*(m2-r) = (m1*m2)/2, then m1, m2, and m3 are pythagorean triplets. Otherwise not.

Science is the queen of human knowledge. Mathematics is the essence of science. Logic is the basis of mathematics. Geometry is the vehicle of intuition.


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top

Conferences | Forums | Topics | Previous Topic | Next Topic

You may be curious to visit the old Guest book.
Please do not post there.

Copyright © 1996-2018 Alexander Bogomolny

[an error occurred while processing this directive]
Search:
Keywords:

Google
Web CTK