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

Given m|n, find the value of x. PLEQSE HELP!!
heeeeeeeeeeelllllllllppppppppppppppp​
If you’re at the grocery store, how is checking out with one of these mobile payment methods (like Google Pay, Apple Pay or Venmo) different than paying with a
Dialysis is performed when a kidney a kidney is functioning. a kidney is failing. a kidney needs to be repaired.
Which scenario best describes purchasing casualty insurance? A. Mitchell buys insurance to protect his new stereo system. B. Carmen gets insurance to cover a c
PLZ HELP ME it's due at 2:45 p.m.
The rows of the periodic table are called groups because similar elements reside next to each other on the modern periodic table. TrueFalse​
How is genocide an act of inhumanity
Please I really need help
IF SOMEONE COULD PLEASE ANSWER ANY OF THE UNANSWERED QUESTIONS I RECENTLY ADDED IT WOULD BE MUCH APPRECIATED!!!!! ASAP PLEASE!!!!!!!!