# Programming/Math Problem

**URL:** <https://forum.kirupa.com/t/programming-math-problem/138974>\
**Category:** Uncategorized\
**Created:** [February 27, 2005, 5:11am UTC](https://forum.kirupa.com/t/programming-math-problem/138974 "2005-02-27T05:11:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerez\_z](https://avatars.discourse-cdn.com/v4/letter/j/bc79bd/32.png) [@jerez\_z](https://forum.kirupa.com/u/jerez_z)\
**Post date:** [February 27, 2005, 5:11am UTC](https://forum.kirupa.com/t/programming-math-problem/138974/1 "2005-02-27T05:11:06Z")

</div>

Today I was presented with this question:

> Given the digits 1 - 9 inclusive, using each digit **once and only once** , arrange them to form **two numbers** such that the square of one number equals the other number.

There are two solutions to this problem. Find them both.

I searched on Google and found the answers, but I have not found the solution (algorithm). Any ideas on how this would be achieved?
