Monday, August 4, 2014

How to find out the begest number between the three number in java

How to find out the begest number between the three number in java
  public class
{
    public static void main(String args[])
     {
      int a,b,c;
      Scanner sc=new Scanner();
     System.out.println("Enter the three number ");
    a=sc.nextInt();
    b=sc.nextInt();
    c=sc.nextInt();

   if(a>b&&a>c)
   {
     System.out.println("The begest number is "+a);
   }
   else if(b>a&&b>c)
   {
     System.out.println("The begest number is "+b);
}
else
{
     System.out.println("The begest number is "+c);
}
  }
}
          

No comments:

Post a Comment

Featured Post

What is JavaScript? What is the role of JavaScript engine?

  The JavaScript is a Programming language that is used for converting static web pages to interactive and dynamic web pages. A JavaScript e...