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

A car has a maximum speed of 341.7 feet/second. Convert this speed to miles/hours.
what are the seas and oceans that surround zimbabwe
2^x+5 = 3^1-x use logarithms to solve the exponential equation. round answer to 3 decimal places.
If The dimensions of a brick that weighs 25N are 0.19m x 0.07m x 0.095m. What pressure does the brick exert on the ground if it is resting on its largest face?
what happens when red lead oxide is heated?
It solves the systems of equations.Discovers which is the method indicated to develop the exercises.the indicated methods are:1. Determinants2. Equalization3. R
what is the highest common factor of 12 and 49?
It solves the systems of equations.Discovers which is the method indicated to develop the exercises.the indicated methods are:1. Determinants2. Equalization3. R
Find the greatest number of six digit which is a perfect square.
how many whole ones equal 40 tenths