Write a program to calculate cube of first 15 even number
Answers
Answered by
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
English,
1 month ago
World Languages,
1 month ago
History,
1 month ago
India Languages,
2 months ago
English,
9 months ago