double result =Math. pow(" 345" .indexOf('5'),3);
what will be it's result. explain how to solve.
Answers
Answered by
31
Answer:
8.00000004
Explanation:
"345".indexOf('5')=2
5 is on 2 nd place of the string so it returns the 2
math.pow(2,3)=2**3=2^3=8 hence the data type is double so the output format will be in double
therefore double contains of 8 numbers after
if ur input contain space infront of 345 the answer will be 27.00000004
Answered by
2
answer will be 8.004 because 345 is the index of the '5' and power is 3 and when we calculate this we will get 8.004 which you can round off further if neede
Similar questions
Physics,
5 months ago
Social Sciences,
5 months ago
Math,
5 months ago
English,
11 months ago
Physics,
11 months ago
Social Sciences,
1 year ago
Science,
1 year ago