Checking whether a number is an Arm Strong no or Not

 

import java.util.*;

public class ArmStrongNumber {
public static void checkNumber(int n) {
int temp;
int digit = 0;
int sum = 0;
int last = 0;
temp = n;
while (temp > 0) {
temp /= 10;
digit += 1;
}
temp = n;
while (temp > 0) {
last = temp % 10;
sum += Math.pow(last, digit);
temp /= 10;
}
if (n == sum) {
System.out.println(n + " is an ArmStrong Number");
} else {
System.out.println(n + " is not an ArmStrong Number");
}
}

public static void main(String args[]) {
checkNumber(153);

}
}

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