write a program in java to input three numbers and print the sum of the square of the smallest and largest number entered
Answers
Answered by
2
Answer:
public class 3nos
{
static void main (int a, int b, int c)
{
System.out.println("u\000C"); // to clear the terminal window after using
if(a>b && a>c && b>c)
{
System.out.println((a*a) + (c*c)+" ");
}
else if(b>a && b>c && a>c)
{
System.out.println((b*b) + (a*a)+" ");
}
else if(c>a && c>b && b>a)
{
System.out.println((b*b) + (c*c)+" ");
}
else
{
System.out.println("all of them are equal or other error");
}
}
}
hope it helps......
pls mark the brainliest took a lot of time
it works checked it myself
Similar questions