import sys


h = 0.3
n = 1000


argv = sys.argv
narg = len(argv)
if narg <= 2:
    print("")
    print("Usage: python sum.py h n")
    print("    Summing up h for n times")
    print("")
    exit()
else:
    h = float(argv[1])
    n = int(argv[2])


print("")
print(f"h = {h}")
print(f"n = {n}")

print("")
a = 0.0
for i in range(n):
    aprev = a
    a += h
    print(f"{i}: {aprev} + {h} => {a}")

print("")
 