Computer Science, asked by moturi007, 2 months ago

java program using ARRAY data to search

Answers

Answered by Anonymous
1

Answer:

Java Program to Search Key Elements in an Array

public class Search_Element.

int n, x, flag = 0, i = 0;

Scanner s = new Scanner(System.

System. out. print("Enter no. of elements you want in array:");

n = s. nextInt();

int a[] = new int[n];

System. out. println("Enter all the elements:");

for(i = 0; i < n; i++)

Explanation:

Similar questions