Printing all leader elements in an array


 public class PrintLeaders {
public static void main(String args[]) {
int arr[] = { 12, 7, 13, 32, 17, 1, 8 };

int i = 0;
int j;

for (i = 0; i < arr.length; i++) {
for (j = i + 1; j < arr.length; j++) {
if (arr[i] <= arr[j]) {
break;
}
}

if (j == arr.length) {
System.out.print(arr[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...