Anonymous user
Arithmetic/Rational/Ada: Difference between revisions
m
prepare for inclusion as template
m (moved Rational Arithmetic/Ada to Arithmetic/Rational/Ada) |
m (prepare for inclusion as template) |
||
Line 1:
<noinclude>{{collection|Rational Arithmetic}}</noinclude>
The generic package specification:
<lang ada>generic
Line 309 ⟶ 308:
end loop;
end Test_Rational;</lang>
The perfect numbers are searched by summing of the reciprocal of each of the divisors of a candidate except 1. This sum must be 1 for a perfect number.
{{out}}
<pre>
6 is perfect
|