Without using if-else statement and ternary operators, accept three unequal numbers and display the second smallest number.
Answers
Answered by
2
Answer:
nfirm your email to get notifications about answers and receive 10 points!
Brainly.in
What is your question?
Secondary SchoolComputer science 5+3 pts
Without using if else and ternary operators,accept three unequal no. and display the second smallest no. use Math.max,math.min. input.34,82,61
Report by AjayTony 27.07.2017
Answers
The Brain
Ssam55225522 · Helping Hand
Know the answer? Add it here!
ayuttam2001otj6jv
Ayuttam2001otj6jv Ambitious
class abc
{
public static void main()
{
int a=82, b=34, c=61;
int x, y, z;
x = (int)Math.max(Math.max(a,b),c);
z = (int)Math.min(Math.min(a,b),c);
y = (a+b+c) - (x+z);
System.out.println("largest = "+x);
System.out.println("middle = "+y);
System.out.println("smallest = "+z);
}
}
Answered by
0
Answer:
uchcigxigziys yd. fy f gsgosyshhd
Similar questions
Math,
6 months ago
English,
6 months ago
English,
6 months ago
Science,
1 year ago
Social Sciences,
1 year ago