Computer Science, asked by cutiee65, 1 year ago

plzz write the program no 3

Attachments:

vivek1000: which book
cutiee65: selina
vivek1000: chap and ex
vivek1000: number
vivek1000: yarr aap chapter question number batao and book

Answers

Answered by Abhishek171023
1

import java.util.*;

public class Greater_no

{

public static void main(String[ ] args)

{

Scanner in=new Scanner(System.in);

int a,b,c;

System.out.println("Enter 3 no:");

a=in.nextInt( );

b=in.nextInt( );

c=in.nextInt( );

if(a==b==c)

{

System.out.println("All no are equal");

}

else

if(a>b&&a<c)

{

System.out.print ln("Greater no="+a);

}

else

if(b>a&&b>c)

{

System.out.print ln("Greater no="+b);

}

else

{

System.out.print ln("Greater no="+c);

}

}

}

Answered by nain31
1

\large \boxed{CODING}

import java . util. *;

class check

{

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&&b==c)

Sy stem . out . println("ALL NUMBERS ARE EQUAL");

else

{

if(a>b&&a>c)

Sy stem . out . println(a+"is greater");

if(c>b&&c>a)

Sy stem . out . println(c+"is greater");

if(b>a&&b>c)

Sy stem . out . println(b+"is greater");

}

}

}

\large \boxed{OUT PUT}

n= 14 , 15 , 16

 \bold{16 \: is \: greater}

n=15,15,15

 \bold{ALL\: NUMBERS\: ARE\: EQUAL}

Similar questions