How do I boost code on android?

Asked

Viewed 578 times

-1

I will make a calculator that needs potentiation, someone can tell me how it is done on android?

  • 4

    Have you seen the Java package for mathematical functions? There is the potentiation method there : Math.Pow

1 answer

1


You can use the static method pow(dobule val1, double val2) class Math:

System.out.println(Math.pow(2.0, 3.0)); //2 elevado a 3

Exit:

8.0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.