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 does the Spanish word conquistador mean literally in English? A. coordinator B. controller C. conqueror D. conciliator
Who knows what is 100237/1982917927+193717397/918928928
I don't know how to do order of operations with fractions ,exponents and whole numbers?
find the sale price if the markdown is 35% and the original price is $3.29
list all the factors of the number. 14
Help me on this word problem plz. So it is... It costs $2.50 to rent bowling shoes. Each game costs $2.25. You have $9.25. How many games can you bowl? So
How to say prime or composite in Spanish
Jackson's bedroom has an area of 90 square feet. the area of his bedroom is 9 times that of his closet. if the closet is 2 feet wide what is its length
15x - 12y =13 30x +9y =4 whats the value of x
Which uses the correct verbs for formal speech or writing? Carl wished it was last year at this time so he could invite someone else to homecoming and have a go