Jump to content

Arithmetic/Rational/Ada: Difference between revisions

m
prepare for inclusion as template
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. Sample output:
{{out}}
<pre>
6 is perfect
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.