Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

to find biggest number among three numbers using binary operator

+1 vote
asked Aug 5, 2019 by anonymous

1 Answer

+1 vote
answered Aug 6, 2019 by Satya Vardhan Reddy Julakanti (160 points)

import java.util.Scanner;

class Biggest{

public static void main(String[] args)

{

int a,b,c;

Scanner sc = new Scanner(System.in);

a = sc.nextInt();

b=sc.nextInt();

c=sc.nextInt();

if(a>b)

{

if(a>c)

{

System.out.println(a+" is the biggest number of the three numbers"+a+","+b+" and "+c);

}

else if(a==c)

{

System.out.println(a+" is equal to "+c+" and greater than "+b);

}

else{

System.out.println(c + " is the biggest number of the three numbers "+a+","+b+" and "+c);

}

}

else{

if(b>c)

{

System.out.println(b+"is greatest of the three numbers"+a+","+b+" and "+c);

}

else if(b==c){

System.out.println(b+ " is equal to "+c +" and greater than "+a);

}

else{

System.out.println(c+"is greatest of the three numbers"+a+","+b+" and "+c);

}

}

}

}

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...