26. JAVA Program Find Biggest of Three Numbers.
How does this program work?
- In this Program you will learn about how to store three numbers in variables.
- And then using if case we are comparing each number
- After comparing each number with other final output is displayed using java.
Here is the code
//Biggest of three numbers.
import java.util.Scanner;public class Biggest
{
public static void main(String args[])
{
int a,b,c;
System.out.println("Enter three numbers");
Scanner obj=new Scanner(System.in);
a=obj.nextInt();
b=obj.nextInt();
c=obj.nextInt();
if( a >b && a> c)
System.out.println(a+" is the Big Number" );
else
if(
System.out.println(b+" is the Big Number" );
else
System.out.println(c+" is the Big Number" );
}
}