write a program to input N numbers in an array print the array elements also print the greatest and smallest integers from the array along with their indexes
Answers
Answered by
2
Answer:
import java.util.*;
public class Question {
public static void main() {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int d = Math.min(aMath.min(b,c));
int e = Math.max(aMath.max(b,c));
System.out.println(d);
System.out.println(e);
}
}
Answered by
0
Answer:
import java.util.scanner
class array
{public void
scanner obj=new scanner(system. in);
int n
int 1=Sc.nextintln();
int 2=Sc.nextintln();
int 3=Sc.nextintln();
int 4Math.max(Math1.max2,3);
int5
S.O.P(4)
S.O.P(5)
}
}
Similar questions