Computer Science, asked by Ayan261, 1 year ago

Find the product of all even numbers from 1to 15

Answers

Answered by kriti2498
0

Answer:

645,120

Explanation:

Even number from 1-15 are

2*4*6*8*10*10*14

Answered by AskewTronics
0

Following are the program for the above question:

Explanation:

product=1 #intialize the value for product varaible.

for x in range(1,16):#for loop which runs from 1 to 15.

   if(x%2==0):#check the value for even number.

       product=product*x #calculate the value of product.

print("The product of the even number from 1 to 15 is: "+str(product)) #print the product value.

Output:

  • The above program gives the output as : "645120".

Code Explanation:

  • The above code is in python language which has a 'for' loop which runs from 1 to 15 and checks every number to be even by the help of if condition.
  • If the number is even then it calculates the product of that number with the previous number.
  • Then the print function will print the value of the product.

Learn More:

  • Python : https://brainly.in/question/14689905

                                                                       

Similar questions