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

Can anyone please write me 2 300 word stories in different styles???
Please help. The question is in the attached image.
4. What is the angular elevation of Polaris in Buffalo NY?
James has a balance of $1700 on a credit card with an APR of 18.7%, compounded monthly. About how much will he save in interest over the course of a year if he
hellpppopppo plzehhshshshs
If measure of angle AOC=104° and measure of angle AOB=7x+30° and measure of angle BOC=9x+42°. What is the measure of angle BOC
What were the Mexica tribute lists?
Has Germany had a lot of civil unrest?
WORTH 50 POINTS!!! Please help me with questions 1,2,3,4,5,6 and 7 ASAP!
Please, I need help with this!!! What is the larger point that Miller is making about "diabolism" in society?