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

In the Bohr model of the atom, an electron in an orbit has a fixed ____. a. position c. energy b. color d. size
9/11 = ?/22 I'm stuck now
What occurs during the female's menstrual cycle?
Use the photo, please help me with 3a and please show work
Why are lobsters scavengers in the ocean?
Although shays rebellion did not achieve its immediate goal what did it prove about the united states
How does the Enlightenment alter perceptions toward the natural world? Toward religion?
which is the largest? 76%,4/5, .77
Which clue indicates that speciation has occurred between two populations?
In most forms of generation of electrical energy in power plants, the two steps are the same.What are they?last