bhattaraisunita20
bhattaraisunita20 bhattaraisunita20
  • 15-05-2021
  • Computers and Technology
contestada

WAP TO FIND THE PRODUCT OF 10 NATURAL NUMBERS​

Respuesta :

phenom786
phenom786 phenom786
  • 15-05-2021

Answer:

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

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))

Answer Link

Otras preguntas

what are runes? thanks in advance
Is sentence 'James while John had had had had had had had had had had had a better effect on the teacher' grammatically correct?
Is sentence 'James while John had had had had had had had had had had had a better effect on the teacher' grammatically correct?
What Is a 'Class Act'?
If a 4 Ω resistor, a 7 Ω resistor, and a 12 Ω resistor are connected in a series, which resistor has the most current in it?
what are runes? thanks in advance
What is the square root of 325
In Economics, What is Signalling?
Why did Vikings kill people?
What is your opinion on Global Warming?