//https://csprograms4u.blogspot.com/
//Chapter 1
//Program 6
//Conditional Operator
import
java.util.Scanner;
public
class CO
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int a,b,max;
System.out.println("Enter First
Number");
a=sc.nextInt();
System.out.println("Enter Second
Number");
b=sc.nextInt();
//Calculation of
Maximum Out of 2
max=((a>b)?a:b);
System.out.println("Maximum of 2
is="+max);
}
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.