Find second largest number in a given number using single loop
Answers
Answered by
16
candidjava;
public class SecondLargest {
public static void main(String[] args) {
int arr[] = { 14, 46, 47, 86, 92, 52, 48, 36, 66, 85 };
int largest = arr[0];
int secondLargest = arr[0];
println("The given array is:" );
for (int i = 0; i < arr. length; i++) {
HOPE HELPS ✌️✌️
public class SecondLargest {
public static void main(String[] args) {
int arr[] = { 14, 46, 47, 86, 92, 52, 48, 36, 66, 85 };
int largest = arr[0];
int secondLargest = arr[0];
println("The given array is:" );
for (int i = 0; i < arr. length; i++) {
HOPE HELPS ✌️✌️
khushi12345610:
hii
Answered by
0
Ranjan walks around arectangular park of length 60 m and breadth 40m and smita walks around a square park of side 55m.both take 3 rounds each. who walks more distance and by how much.
Similar questions