How many numbers between 1 to 1000 are both squares and cubes?
Answers
Answered by
18
64=8*8=4*4*4
729=27*27=9*9*9
so answer is only two numbers
729=27*27=9*9*9
so answer is only two numbers
Answered by
0
A number N is provided to us. The task is to determine how many numbers up to N are both perfect squares and perfect cubes. For instance, 1,64 and 729 are ideal squares and ideal cubes.
We will calculate a number's square root using sqrt() and its cube root using cbrt().
Let's use examples to clarify.
Enter N=100
Count the number of squares and cubes that are perfect as an output.
The only numbers from 1 to 100 that are perfect squares and cubes are 1 and 64.
Enter N=1000
Count the number of squares and cubes that are perfect.
The only numbers from 1 to 1000 that are perfect squares and cubes are 1, 64 and 729.
For more such question on square root: https://brainly.in/question/50206065
#SPJ3
Similar questions
Social Sciences,
7 months ago
Math,
7 months ago
Environmental Sciences,
1 year ago
Social Sciences,
1 year ago
Math,
1 year ago