Loading Posts...

program for largest no.

program for largest no.
import java.out.*;
import java.util.*;
public  class largest
{
public static void main(string[] arg)
{
Scanner sc=new Scanner(System.in);
int a,b,c;
        Scanner sc=new Scanner(System.in);
        System.out.println("enter a=");
        a=sc.nextInt();
        System.out.println("enter b=");
        b=sc.nextInt();
        System.out.println("enter c=");
        c=sc.nextInt();
        if(a>b)
        {
            if(a>c)
                System.out.println("a is greater");
            else
                System.out.println("c is greater");
        }
        else
        {
            if(b>c)
                System.out.println("b is greater");
            else
                System.out.println("c is greater");
        }
}
}
        
        

 

 

 

 

 

krish..

The author didnt add any Information to his profile yet

Leave a Comment

Loading Posts...
Inline
Inline