Computer Science, asked by shembrom92, 2 months ago

write Java program for the following to accept two number and find the average of square of two number​

Answers

Answered by kamalrajatjoshi94
3

Answer:

Program:-

import java.util.*;

public class Average

{

public static void main(String args[ ])

{

Scanner in=new Scanner(System.in);

int a,b;

double avg=0.0;

System.out.println("Enter the numbers");

a=in.nextInt();

b=in.nextInt();

avg=(a*a+b*b)/2.0;//To calculate the average

System.out.println("The average of square of the numbers="+avg);

}

}

Similar questions