63.8k views
0 votes
WAP TO FIND THE PRODUCT OF 10 NATURAL NUMBERS​

1 Answer

2 votes

Answer:

since you didn't specify which language to write it in, this is for python

Step-by-step explanation:

def sum(N):

s = 0

for i in range(N + 1):

s += i

return s

def product(N):

p = 1

for i in range(1, N+1):

p *= i

return p

for i in (500, 9, -2):

print(i)

print(sum(i))

print(product(i))

User Samuel Hapak
by
7.6k points