Computer Science, asked by nishinishu1970, 1 year ago

Without using if else statement and ternary operators accept three unequal numbers and display the second smallest number sample input :34,82,61 sample output :61


akhilarul324: then how to do this??????????????????

Answers

Answered by akhilarul324
2

Answer:

answer is below

Explanation:

sopln-System.out.println

import java.util.*

class akh

{

   public static void main(String akhand[])

       {    

           int a,b,c,d;

           Scanner sc=new Scanner(System.in)

            sopln("no 1");

            a=sc.nextInt();

            sopln("no 2");

            b=sc.nextInt();

            sopln("no 3");

            c=sc.nextInt();

            d=math.max(a,b);

            d=math.max(d,c);

            sopln("biggest no is"+d);

       }

}                                      

math.max find biggest among 2 no

Answered by sneha413639
6

Answer:

your answer is in the ATTACHMENT...

Attachments:
Similar questions