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

name all the sets of numbers to which each real number belongs let N= natural number , W= whole number , Z : interger , Q rational number and I: irrational numb
Forcible administration of medication to a patient who does not consent would be considered __________.
You tell a friend, “you must be busy. i'd better let you go,” because you want out of the conversation. what type of lie did you use?
A community is building a square park with sides that measure 110 meters. To separate the picnic area from the play area, the park is split by a diagonal line f
In order to create an electromagnet, you would ?
need help parabola and its vertex
How many atoms of hydrogen are in 0.75 mol of (c3h5)2s?
The Presidency and the President's Cabinet are defined in ________ of the Constitution.
can someone help with this one
Does eating while lying down make you fat