DataMuseum.dk

Presents historical artifacts from the history of:

CP/M

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about CP/M

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦fb4d9a197⟧ TextFile

    Length: 256 (0x100)
    Types: TextFile
    Names: »POTENS.PAS«

Derivation

└─⟦49cd49952⟧ Bits:30009431 50004848
    └─⟦0c326962c⟧ 
        └─⟦this⟧ »POTENS.PAS« 

TextFile

program sumofpowers (input,output);
var n,x,power,i,sum : 0..maxint;
begin 
read(n);sum:=0;
for x := 1 to n do
begin
power:=1;for i:=1 to x do power:=power*x;
sum:= sum + power
end;
writeln(sum)
end.
    «eof»