Computer Science, asked by ranipooja20, 11 months ago

Challenge: Write the code to find the third largest number in given Array
Note:
Do not change the Method signature
Do not use main() method, Scanner class or System.out.println etc.
Use Java online compiler to execute the code
public class Solution{
public static int getThirdLargestNumber(int[] array){
//write your code here
}
Sample Input: [14,67,89,24,19]
Sample Output: 24​

Answers

Answered by Anonymous
1

Answer:

if(a>b)

{

if(a>c)

System.out.println("a is largest");

}else if(b>c)

System.out.println("b is largest");

else

System.out.println("c is largest");

Explanation:

Similar questions