# Programming Shortcut

## Monday, February 4, 2019

### Biggest and smallest from three given numbers in java

Hello friends! Welcome to my website
Java programming to find the biggest and the smallest number between two numbers?
This Java language programming is free all type of errors like the compiler and runtime errors and this programming is tested to compile and then run the program code.
Here is only programming code with the output. This programming output is customized to understand easily.

### Find the Biggest and smallest number from three given numbers in java

import java.util.Scanner;
class test {
int a, b, c;
public void biggest(int a, int b, int c) {
if (a > b && a > c) {
System.out.println(a+" is "+" biggest than "+b+" and "+c);
}
else if (b > a && b > c) {
System.out.println(b+" is "+" biggest than "+a+" and "+c);
}
else{
System.out.println(c+" is "+" biggest than "+a+" and "+b);
}
}
public void smallest(int a, int b, int c) {
if (a < b && a < c) {
System.out.println(a+" is "+" smallest than "+b+" and "+c);
}
else if (b < a && b < c) {
System.out.println(b+" is "+" smallest than "+a+" and "+c);
}
else{
System.out.println(c+" is "+" smallest than "+a+" and "+b);
}
}
}
public class biggest {
public static void main(String[] args) {
test o = new test();
Scanner c = new Scanner(System.in);
o.a= c.nextInt();
o.b= c.nextInt();
o.c= c.nextInt();
System.out.println("---------------");
o.biggest(o.a, o.b, o.c);
System.out.println("---------------");
o.smallest(o.a, o.b, o.c);
}
}

Output:
---------------
15 is  biggest than 12 and 11
---------------
11 is  smallest than 12 and 15

I make this programming and hope you are like the post if are you like the post you can please comment and Share the post to reach more people.