Computer Science, asked by anjumsagira57, 4 months ago

write a java programe thar prompts the user two integer numbers than display the sum of their squares,average of theur squares and maximum of two.​

Answers

Answered by jeromeseejo73
6

Answer:

import java.util.Scanner;

public class display

{

public static void main(String[] args)

{

 Scanner sc=new Scanner(System.in);

 System.out.print("ENTER THE FIRST NUMBER :");

 int a=sc.nextInt();

 System.out.print("ENTER THE SECOND NUMBER");

 int b=sc.nextInt();

 int max=Math.max(a,b);

 int sumsqrs=a*a+b*b;

 float avgsqrs=(float)sumsqrs/2;

 System.out.println("THE SUM OF THE SQUARES OF "+a+" AND "+b+" IS "+sumsqrs);

System.out.println("THE AVERAGE OF THE SQUARES OF "+a+" AND "+b+" IS "+avgsqrs);

System.out.println("THE MAXIMUM BIGGER NUMBER IS: "+max);

//A HUMBLE REQUEST.CAN YOU PLEASE MARK MY ANSWER THE BRAINLIEST

}

}

Similar questions