Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,18 @@
include c:\cxpl\codes; \intrinsic 'code' declarations
func Perfect(N); \Return 'true' if N is a perfect number
int N, S, I, Q;
[S:= 1;
for I:= 2 to sqrt(N) do
[Q:= N/I;
if rem(0)=0 then S:= S+I+Q;
];
return S=N & N#1;
];
int A, N;
[for A:= 1 to 16 do
[N:= (1<<A - 1) * 1<<(A-1);
if Perfect(N) then [IntOut(0, N); CrLf(0)];
];
]