Finding smallest and largest Kth element.

 

import java.util.*;

public class SLKthElement {

public static void main(String args[]) {
Integer arr[] = new Integer[] { 11, 2, 23, 9, 4, 100, 50, 63 };
Scanner sc = new Scanner(System.in);
System.out.println("Enter value of K");
int k = sc.nextInt();
Arrays.sort(arr);
System.out.println("Smallest " + k + "th " + "element is " + arr[k]);

Arrays.sort(arr, Collections.reverseOrder());
System.out.println("Largest " + k + "th " + "element is " + arr[k]);
}
}

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