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

What are the functions of receptors in our body? Think of a situation where receptors do not work properly. What problems are likely to arise?
you have a standard deck of 52 cards. you pick one card and then, with out putting the first card back, you pick a second card. what is the probability that bot
What is the least common denominator for 5/6 and 3/8. 3/4 and 6/7
how were north american colonies all similar in the 1700s?
What were the major causes of WWII? Please include at least 4 answers.
Why is sodium sulphate hemihydrate called as "Plaster of Paris"?
Why is sodium sulphate hemihydrate called as "Plaster of Paris"?
how do you write 4540 million in standard form?
What were the major causes of WWII? Please include at least 4 answers.
What are the functions of receptors in our body? Think of a situation where receptors do not work properly. What problems are likely to arise?