hulk815 hulk815
  • 03-06-2022
  • Computers and Technology
contestada

Write a java program as follows Write a method called powOfTwo that takes an integer as parameter, computes, and outputs it’s square

Respuesta :

Аноним Аноним
  • 03-06-2022

Answer:

public static int powOfTwo(int input) {

 return input*input;

}

You will have to call this method in main
for printing it, write

System.out.println(powOfTwo(your number));

in public static void main(str[]args) {

}

Ver imagen Аноним
Answer Link

Otras preguntas

If every positive number has two square roots and you can find the length of the side of a square window by finding a square root of the area, why is there only
hey guys i know this seems long but i really need the help so plzz]Step 1: Write five word phrases to be translated using the various key terms from the lesson.
List the perfect squares between 100 and 500 that are even numbers
Write an addition equation with a positive addend and a negative addend and a resulting sum of -8
a couple wants to install a square mirror that has an area of 500 square inches.to the nearest tenth of an inch,what length of wood trim is needed to go aroun
placing 12 tiles side by side, Pete can make a 12-by-1 rectangle. Name two other rectangles Pete can make with 12 tiles
List the perfect squares between 100 and 500 that are even numbers
16x^2-24x+7=0 equation and/or inequalities
How does the saguaro cactus take advantage of rare, brief rainfall?
what is a post hoc fallacy?