Untitled

mail@pastecode.io avatar
unknown
java
2 years ago
291 B
2
Indexable
Never
public static boolean search (int [] array , int targetNumber){
       
    boolean found = false;
      
     for (int a = 0; a < array.length; a++ ){
        if ( array [a] == targetNumber ){
           
            found = true;
            break;
        }
     }

    return element1;
}