Computer Science, asked by bob8481, 1 year ago

I need the answer of this question
JAVA PROGRAMMING ​

Attachments:

Answers

Answered by Arshmalgundkar
1

Answer:

class demo

{

Public static void main (String args[]) {

int a, b, c;

Scanner s=new Scanner (System. in);

System.out.println('' Enter the first number:'') ;

a=s. nextInt() ;

System.out.println('' Enter the second number:'') ;

b=s. nextInt() ;

System.out.println('' Enter the third number:'') ;

c=s. nextInt() ;

if (a! =b & & b! =c & & c! =a)

{

if (a>b & & a>c)

{

System.out.println (+a+ "is greatest number") ;

}

else if (b>a & & b>c)

{

System.out.println (+b+ "is greatest number") ;

}

else

{

System.out.println (+c+ "is greatest number") ;

}

if (a>0 & & b>0 & & c>0)

{

System.out.println("Entered numbers are qositive") ;

}

else if (a<0 & & b<0 & & c<0)

{

System.out.println("Entered numbers are negative ") ;

}

else

{

System.out.println("Entered number are mixed ") ;

}

}

}

Answered by sayan3817
1

Answer:

class Numbers

{

public static void integers(int x, int y, int z)

{

// checking if they are equal or not.

if(x=y=z)

System.out.println("They are equal");

else if(x>y && x>z)

System.out.println(x+"is the greatest number");

else if(y>x && y>z)

System.out.println(y+ "is the greatest number");

else if (z>x && z>y )

System.out.println( z+ " is the greatest number");

if (x>=0 && y>= 0 && z>= 0)

System.out.println(" They all are posetive");

else if (x<0 && y<0 && z<0)

System.out.println(" They all are negative");

else

System.out.println(" They are mixed numbers");

}

}

Similar questions