Computer Science, asked by ganeshpandey33313, 6 months ago

WAP to input three numbers and print the average of the largest two numbers.

No spam please ​

Answers

Answered by manju199290
0

qwertyuiopasdffghjklz

Answered by naveenvenkata79
0

Answer:

public class Average{

public static void main(String[] args){

Scanner sc=new Scanner(System.in);

int [] ia=new int[3];

for(int i=0;i<ia.length;i++){

ia[i]=sc.nextInt();

}

Arrays.sort(ia);

System.out.println(ia[length-1]+ia[length-2]);

Explanation:

Similar questions