Finding the index of a specific number in an Array

 import java.util.*;


public class FindIndex {

public static void printIndex(int arr[], int n) {
int i = 0;
while (i < arr.length) {
if (arr[i] == n)
System.out.println(i);

else
i=i++;
}
}

public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter the size of the Array");
int n = sc.nextInt();
int myarr[] = new int[n];

for (int i = 0; i < n; i++) {
myarr[i] = sc.nextInt();

}
System.out.println("Enter the element to be found");
int element = sc.nextInt();
printIndex(myarr, element);
}
}

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...