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

what is 140/216 in simplest forms
How to make a mixed fraction
HELP HELP HELP HELP PLEASE (sorry ) can u complete this tiny is to .................. as broad is to ........................ the words to fill this in are tiny
Divide and express the result in standard form. 8/7-i
what is 140/216 in simplest forms
What is .5v^1/3 Can u please help? Ian super lost!!!!!!
ted is making three picture frames like the one shown below.what length wood does ted need for all three picture frames?
prove that x^n-Y^n divisible by x-y for all natural numbers x,y (x!=y),and n.
prove that x^n-Y^n divisible by x-y for all natural numbers x,y (x!=y),and n.
briefly describe Theodore Geisel's career in advertising