(12C) Pythagorean Triple
|
09-18-2019, 11:37 AM
(This post was last modified: 09-19-2019 12:48 AM by Gamo.)
Post: #1
|
|||
|
|||
(12C) Pythagorean Triple
Program to generate a Pythagorean Triples based on this formula
a = m^2 - n^2 , b = 2mn , c = m^2 + n^2 for m > n with m and n co-prime and not both odd ------------------------------------------------- Procedure: FIX 0 Your choice of integer m > n m [ENTER] n [R/S] display answer a ... b ... c [R/S] add one on both m and n and display next result. To start over with new pair of m and n f [PRGM] ------------------------------------------------- example: f [PRGM] m = 2 , n = 1 2 [ENTER] 1 display 3 .... 4 .... 5 [R/S] 5 ... 12 ... 13 To review result use [R↓] [R↓] [R↓] -------------------------------------------------- Program: Code:
Gamo |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(12C) Pythagorean Triple - Gamo - 09-18-2019 11:37 AM
RE: (12C) Pythagorean Triple - Albert Chan - 09-20-2019, 04:33 PM
|
User(s) browsing this thread: 1 Guest(s)