Biggest of 3 numbers program in java

Previous
Next
import java.util.Scanner;
public class BigOne 
{
	public static void main(String[] args) 
	{
		Scanner scan = new Scanner(System.in);
		System.out.println("Enter 3 numbers : ");
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		if(a>b && a>c)
			System.out.println("a is big");
		else if(b>c)
			System.out.println("b is big");
		else
			System.out.println("c is big");
	}
}

Output:

Enter 3 numbers :
20
30
10
b is big
Previous
Next

Courses Enquiry Form