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

Need help with this too
who is chief Manuelito
What is a physical change
How he will move in terms of the forces acting on him
Which phrase correctly completes this sentence? En été le temps à la côte est ______________________. A. froid et pluvieuse B. froid et humide C. chaud et h
Why does water dissolve sugar ? Explain your answer !
Carlos wants to participate in a physical activity that will best improve his heart rate heart function which type of activity should he choose?
EASY QUESTION !! Review the cladogram below and Identify the characteristic that the turtle and leopard have in common that the other organisms lack?
pls help will give 5star and brainliest
Evaluate 7(-4) - |-6| + |4| A. 13 B.-18 C. -30