Computer Science, asked by Anit10, 8 months ago

write a java program to Input 3 unequal numbers and display the second smalledt number sample number :65,41,98 sample output:65

Answers

Answered by sumithrasumi2215
15

Answer:

import java.util.*;

public class Unequal_Number

{

public static void main ()

{

Scanner sc= new Scanner (System. in );

int a, b, c;

System. out. println ("enter 3 numbers ");

int a=sc.nextInt ();

int b=sc.nextInt ();

int c=sc.nextInt ();

int d= math.max (a, b);

int e= math. min(c, d)

System. out. println ("the second smallest number"+e);

} }

Answered by ilamajumdar4
0

output

enter 3 numbers

43 56 78

the second smallest no 56

Attachments:
Similar questions