Iterated digits squaring: Difference between revisions
→{{header|Fōrmulæ}}
imported>Maxima enthusiast No edit summary |
|||
(One intermediate revision by one other user not shown) | |||
Line 1,704:
{{FormulaeEntry|page=https://formulae.org/?script=examples/Iterated_digits_squaring}}
'''Solution'''
The following function returns the end value (either 1 or 89) of a given number:
[[File:Fōrmulæ - Iterated digits squaring 01.png]]
The following function calculates the number of 89 endings, from 1 to a given number:
[[File:Fōrmulæ - Iterated digits squaring 02.png]]
'''Test case'''
[[File:Fōrmulæ - Iterated digits squaring 03.png]]
[[File:Fōrmulæ - Iterated digits squaring 04.png]]
=={{header|Go}}==
Line 3,854 ⟶ 3,870:
=={{header|Wren}}==
{{trans|FreeBASIC}}
<syntaxhighlight lang="
var digit = 0
var sum = 0
|