Searching the index of an element in a given array


 import java.util.*;
public class Arrays2 {

public static void main(String args[]){
Scanner sc = new Scanner(System.in);
System.out.println("Enter the size of array");
int size = sc.nextInt();
System.out.println("Enter the element of array");
int numbers[] = new int[size];
//input
for(int i=0; i<size; i++){
numbers[i] = sc.nextInt();
}
System.out.println("Enter the number to be found");
int x = sc.nextInt();
//output
for(int i=0; i<numbers.length; i++){
if(numbers[i] == x){
System.out.print("x is found at index :"+i);
}
}
}
}

Google Script for Data Entry Form in Google Spreadsheet

// function to validate the entry made by user in user form function validateEntry (){ // declare a variable and referernece of active goog...