Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
linear search
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.Scanner; import java.lang.*; class Rextester { public static void main(String args[]) { Scanner in=new Scanner(System.in); int a[]={725,1936,1,24,34.2,54,67,3,98,26,07,65,46}; System.out.println("enter the element to be search"); int n=in.nextInt(); for(int i=0;i<a.length;i++) if(n==a[i]) System.out.println(i); } }
run
|
edit
|
history
|
help
1
Engine Java
Print out perfect numbers 0 – 10,000
Lexisort
Java Constructors
Parse and flatten string
Black Jack by Craig
메소드구현하기-해결
Strotium no.
1.5
Java - SimpleDateFormat(ting) for XML