You are on page 1of 1

Practical -3

public class Example


{
public static void main(String[] args)
{
int a=20,b=30,c=10;

int max = (a> b && a>c) ? a : ((b>a && b>c) ? b : c) ;


System.out.println(max + " is maximum");}
}

Output:

30 is maximum

You might also like