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

Click on the box below to choose the correct sentence pattern for the sentence below. There is no really good reason for that change. sentence pattern:
The data in the table above show how far a sea turtle travels over several days. What would the line on a graph of this data look like? A The line would curve
Can someone help me with these questions, please explain your answer. :D
The Chesapeake Bay watershed includes_____________ states and Washington DC. a.6 b.9 c.1 d.3​
The scale of a map is 1 in. = 35 mi. On the map, the distance between two cities is 3.25 in. What is the actual Distance?
Write in two points of peace​
Which of the following best describes the solution to the equation below? 6(x+7)=6x+42
Why did Charles not deserve his Execution?
$450 at 7% for 2 years. $
What number does A represent in the recipe?