Program Forschool
Program Forschool
PROGRAM
import java.util.*;
class xyz
int a[] , n ;
{ this.n=n ;
a = new int[n] ;
int k ;
for(k=0 ; k<n ; k++)
a[k] =sc.nextInt();
int t ;
System.out.print(a[t]+ ",");
System.out.println();
int w, f =-1 ;
if (a[w]== s)
f=w;
break;
if(f<0)
else
int m ,e ;
m = sc.nextInt();
ob.input();
System.out.print(" enter searching element");
e = sc.nextInt();
ob.Search(e);
OUTPUT :
enter size of array10
4
6
33
55
99
45
65
25
69
10
enter searching element 69
69 is found at 9 position
VDD Table
Data Type Description
Integer a to input the array
Integer n to enter the size of
The array
Integer s to enter the number
To b searched
Integer w, k, t used for loop