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

2^x+5 = 3^1-x use logarithms to solve the exponential equation. round answer to 3 decimal places.
simplify the equation simplify x^5/8/x^1/6
Last one for the day :)Find the slope of the line
What happens when a glass rod is dipped in HCl and is brought near ammonia gas?
Find the greatest number of six digit which is a perfect square.
simplify sin(3x+13)=cos(4x)
find the slope and y intercept y=2
Is the following correspondence a function? Yes or No?
what is the answer to this proplem in the picture.
how many whole ones equal 40 tenths