Program:-
import java.util.Scanner;
public class p4{
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
int a,b;
System.out.print("Enter the First numbers: ");
a =sc.nextInt();
System.out.print("Enter the Second numbers: ");
b = sc.nextInt();
if(a>b)
{
System.out.println(a+"is big");
}
else
{
System.out.println(b+" is big");
}
}
}
Output:-
import java.util.Scanner;
public class p4{
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
int a,b;
System.out.print("Enter the First numbers: ");
a =sc.nextInt();
System.out.print("Enter the Second numbers: ");
b = sc.nextInt();
if(a>b)
{
System.out.println(a+"is big");
}
else
{
System.out.println(b+" is big");
}
}
}
Output:-
No comments:
Post a Comment