Computer Science, asked by aanyasrivastava24dec, 2 months ago

write a program to take two number as input from the user and find the greater number​

Answers

Answered by JulietHudait
4

import java.util.*;

class great

{

public static void main(String args[ ])

{

Scanner sc=new Scanner(System.in);

int a,b;

System.out.println("Enter two numbers");

a=sc.nextInt();

b=sc.nextInt();

if(a>b)

{

System.out println(" The greater number is="+a);

}

else

{

System.out.println("The greater number is="+b);

}

}

}

Similar questions