Computer Science, asked by Radon, 1 year ago

write a program in java(use class not arrays) to enter three unequal numbers and display the second largest number of the three


abcd12345: sorry i don't know
Radon: no problem but thanks to at least see
SHREE54: SO SORRY I DON'T KNOW HOW TO ...............................................................|
Radon: no problem at least you bothered

Answers

Answered by osama5268
4
Class secondgreatest
{
public static void main(int a, int b, int c)
{
Int sg=0;
If(((a<b) && (a>c)) || ((a>b)&&(a<c)))
sg=a;
else if(((b>a) &&(b<c))|| ((b<a) && (b>c)))
sg=b;

else
sg=c;
System. out. println("second greatest number is"+sg);
}
}
Similar questions