Computer Science, asked by someshkhanda, 9 months ago

what will be it's solution​

Attachments:

Answers

Answered by anindyaadhikari13
5

Here is your code.

<hr/>

import java.util.*;

class Second_Smallest

{

public static void main(String s[])

{

Scanner sc = new Scanner(System.in);

System.out.print("Enter first number: ");

int a=sc.nextInt();

System.out.print("Enter second number: ");

int b=sc.nextInt((;

System.out.print("Enter third number: ");

int c=sc.nextInt();

int s=0;

if(a>b)

{

if(b<c)

s=b;

else

s=c;

}

if(b>c)

{

if(c<a)

s=c;

else

s=a;

}

if(c<a)

{

if(a<b)

s=a;

else

s=b;

}

System.out.println("Second Smallest Number is: "+s);

}

}

&lt;hr/&gt;

Similar questions