Write a Java programme to accept 2 numbers and calculate the greater number...
Answers
Answered by
1
Answer:
thia is the answer
Explanation:
Java Program to Find the Largest Two Numbers in a Given Array
public class largest_and_second.
Scanner scn = new Scanner (System.
System. out. print("Enter no. of elements you want in array:");
int n = scn. nextInt();
int array[] = new int[n];
System. out. println("Enter all the elements:");
for (int i = 0; i < array. length; i++)
array[i] = scn. nextInt();
Similar questions