emojigirl7200 emojigirl7200
  • 01-12-2021
  • Computers and Technology
contestada

How to square a number in java.

Respuesta :

emmaginative
emmaginative emmaginative
  • 01-12-2021

Answer:

num**2

Explanation:

To square a number in Java, you just take the number and use two asterisks (**) to denote an exponent, and then connect a 2 to it.

For example, if your number is 5:

5**2 in Java means 5^2, which is 25.

Just like how 5**3 in Java means 5^3.

Hope this helps.

Answer Link

Otras preguntas

When was World War I?
A 1 digit number and a 3 digit number have a sum of 205.  The same two number have a difference of 195, a product of 1,000 and a quotient of 40.  What are the t
Why is RNA necessary to act as messenger?
A child is standing across the street from his apartment . His mother is on their balcony . The angle of elevation between the child's eyes and his mothers eyes
What is a direct combination reaction?
Solving systems by elimination: 2x + 4y = -4 3x + 5y = -3 Please show me your work so I can do the rest myself. Thanks!
What is a direct combination reaction?
A child is standing across the street from his apartment . His mother is on their balcony . The angle of elevation between the child's eyes and his mothers eyes
Was the Gold Rush a good or bad thing for the United States?
Why is RNA necessary to act as messenger?