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

How can i talk to jacob startouris?
BIBLE if someone answer this I'll give you 30 points!!! Please hurry
A 12 pack of scented pencils sells.for $3.00 at the book store. What is the sales tax rate is the total cost of the pencils is $3.21
What percentage of adults in the united states and england get at least 30 minutes per day of exercise?
Employees who record and are paid for the exact of amount of time spent working are paid on a(n) _____ basis.
Which academy was founded in London in 1660 to promote and encourage the works and ideas of scientists?
Can you help me on number 1 and 3.
True or false accounting income is based on verifiably completed transactions.
The gaseous envelope surrounding earth is called ___
In which jurisdiction would further review of a federal court decision fall under? A. original B. appellate C. superior D. state