double factorial (float num) {
if(num > 1) return num*factorial(num-1); return 1;
}