Printing a Pentagonal Number

 import java.util.Scanner;


public class PrintPentagonalNumber {
public static void main(String[] args) {
int count = 0;
for (int i = 1; i <= 50; i++) {
System.out.printf("%-6d", getPentagonalNumber(i));
count++;
if (count % 10 == 0){
System.out.println();
}
}
}

public static int getPentagonalNumber(int i) {
return (i * (3 * i - 1)) / 2;
}
}

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