solve this also please tomorrow is my exam
Attachments:
![](https://hi-static.z-dn.net/files/dd1/393df29ae765113cc79c03bbce9be89d.jpg)
Answers
Answered by
0
class Great
{
public static void main(int input1, int input2, int input3)
{ int greatest,smallest;
if(input1>input2&&input1>input3)
{
greatest=input1;
}
else if(input2>input1&&input2>input3)
{
greatest=input2;
}
else
{
greatest=input3;
}
if(input1<input2&&input1<input3)
{
smallest=input1;
}
else if(input2<input1&&input2<input3)
{
smallest=input2;
}
else
{
smallest=input3;
}
System.out.println("Greatest is "+greatest);
System.out.println("Smallest is "+smallest);
}
}
Similar questions