Computer Science, asked by rohitmanda6961, 2 months ago

Write a program to calculate cube of first 15 even number

Answers

Answered by allysia
1

Language:

Python

Program:

n=15

a=0

m=0

while True:

     if a%2==0:

            print(a * * 3)

            m=m+1

     a=a+1

     if m==15:

         break

Explanation:

  • n saves number of terms.
  • a controls the numbers and m controls the numbers of terms to be printed.
  • a * * b (with space) prints a raised to be power of b.
Similar questions