write a program to print cubes of numbers in the range 5 to 12
Answers
Answered by
1
Answer:
Perfect cubes in a range
Given two given numbers a and b where 1 <= a <= b, find perfect cubes between a and b (a and b inclusive).
Examples:
Input : a = 1, b = 100
Output : 1 8 27 64
Perfect cubes in the given range are
1, 8, 27, 64
Input : a = 24, b = 576
Output : 27 64 125 216 343 512
Perfect cubes in the given range are
27, 64, 125, 216, 343, 512
Similar questions