Computer Science, asked by iycannushree213, 4 months ago


write program to input there unequal numbes. Display number among them​

Answers

Answered by ratamrajesh
0

Answer:

Explanation:

OPEN THE IMAGE

Attachments:
Answered by Anonymous
0

This is according to your question and comments in the question that you will have only 3 inputs and you want to find 2nd smallest and you have to use min and max only. If it is not the case update the question for the correct answer to your intended question.

//to display second smallest number out of three

import java.util.*;

public class Prog

{

public static void main(String[] args)

{

Scanner in = new Scanner (System.in);

int a,b,c,d,e;

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

a = in.nextInt();

b = in.nextInt();

c = in.nextInt();

d = Math.min(a, b);

e = Math.max(d,c);

System.out.println(+e);

Similar questions