REM This program adds the p-th powers of the first N positive integers CLS DEFINT I, N DEFDBL P, S INPUT "Enter a positive integer N : ", N INPUT "Enter a power p : ", p I = 1 sum = 0 DO WHILE I <= N sum = sum + I ^ p I = I + 1 LOOP PRINT PRINT "1 ^"; p; "+ 2 ^"; p; "+ ... +"; N; "^"; p; " = "; sum PRINT : PRINT "Bye" END