why do you need Math.pow()?

will this work?

fun() // input 5467

// take first character and transform into integer

//multiply by 10 * index of character which is zero

that is 5 + 0 = 5

then take the next character and transform into integer

now multiply 5 * 10 * index of character which is one

50 +4 = 54

repeat

540+ 6 = 546

5460 + 7 = 5467

running time is O(k) k = no of digits

or O(n) n being the number

You can do math on individual characters, so subtract a constant from '5' and you can transform that character into an actual integer, 5. Then you need the String class and the Math.Pow() function. Don't forget to import the library that contains Math.Pow() !