Computer Science, asked by alfredbilly27, 5 months ago

here is a function we are providing in for you in this problem called square. It takes one integer and returns the square of that integer value. Write code to assign a variable called xyz the value 5*5 (five squared). Use the square function, rather than just multiplying with *.

Answers

Answered by godfather7
0

Answer:

import java.io.*;

class_multiply

{        

public static void main(String args[]) throws IOException

{

BufferedReader br= new BufferedReader(new InputStreamReader(System.in));

int xyz=square(5);

System.out.println(xyz);

}

static int square(int a)

{

return Math.pow(a,2);

}

}

Explanation:

Hope it helps... Pls mark as brainliest

Answered by niranjanasathish
0

Answer:

Python

def square(x):

return x*x;

xyz = square(5);

Java

public class SquareFile{

public static int square(int number){

return number * number;

}

public static void main(String args[]){

int xyz = square(5);

}

}

Similar questions