Finding the smallest number using Method

 import java.util.*;


public class FindSmallestNo {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter the first number");
double x = sc.nextDouble();
System.out.println("Enter the Second number");
double y = sc.nextDouble();
System.out.println("Enter the Third number");
double z = sc.nextDouble();

System.out.println("The smallest no is : " + smallest(x, y, z));

}
//Defining Method
public static double smallest(double a, double b, double c) {
if (a > b && b > c) {
return c;
} else if (b > a && c > a) {
return a;
} else {
return b;
}
}
}

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