import java.util.Scanner;
class file_name{
public static void main(String ar[]){
Scanner s=new Scanner(System.in);
System.out.print("Enter First Value : ");
int a=s.nextInt();
System.out.print("Enter Second Value : ");
int b=s.nextInt();
if(a > b)
System.out.println(" Greater Value is : "+a);
else
System.out.println(" Greater Value is : "+b);
}
}
OutPut
-----------------------
Enter First Value : 50
Enter Second Value : 45
Greater Value is : 50
class file_name{
public static void main(String ar[]){
Scanner s=new Scanner(System.in);
System.out.print("Enter First Value : ");
int a=s.nextInt();
System.out.print("Enter Second Value : ");
int b=s.nextInt();
if(a > b)
System.out.println(" Greater Value is : "+a);
else
System.out.println(" Greater Value is : "+b);
}
}
OutPut
-----------------------
Enter First Value : 50
Enter Second Value : 45
Greater Value is : 50
No comments:
Post a Comment