Computer Science, asked by Rainbowgain, 2 months ago

Write a program using if else and ternary opertors to find the second smallest number ​

Answers

Answered by Anisha5119
4

Answer:

import java.util.*;

class Program

{

public static void main ()

{

Scanner sc= new Scanner (System.in);

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

int v= sc. nextInt();

int a= sc.nextInt();

int i= sc.nextInt();

int e=sc.nextInt();

int k= sc.nextInt();

int e= (int) Math.min(v,a);

int k=(int) Math.max(e,i);

System.out.println("Second smallest number="+k);

}

}

Answered by ItzStarling
1

Answer:

import java.util.*;

class Disarium

{

public static void main()

{import java.util.*;

class Disarium

{

public static void main()

{import java.util.*;

class Disarium

{

public static void main()

{import java.util.*;

class Disarium

{

public static void main()

{import java.util.*;

class Disarium

{

public static void main()

{import java.util.*;

class Disarium

{

public static void main()

{

Similar questions