PROGRAM SumNums; VAR num:INTEGER; FUNCTION sumupto(n:INTEGER):INTEGER; VAR m:INTEGER; BEGIN sumupto:=0; IF n>0 THEN BEGIN m:=n-1; sumupto:=n+sumupto(m); END; END; BEGIN GET(num); PUT(sumupto(num)); END.