/* http://www.mrwadlo.com */ #include #include double fact( double num ); int main() { int sides_p; double sides[26]; int axis; int i; double numer=0, denom=1; clrscr(); printf("\nWelcome to the hypercubic calculator. This program can determine the number of\n"); printf("possible combinations of path leading from one location to another. The start\n"); printf("and end point are located at a location with integer axis values. The start\n"); printf("point is assumed to be at the origin. Each move is in the direction of one of\n"); printf("the axis (diagonal moves prohibited).\n\n"); do { printf("Enter total number of Axis (3 is a normal cube; 26 maximum): "); scanf("%d",&axis); } while ( axis > 26 || axis < 1 ); if ( axis != 1 ) { printf("\nError may result when sum of Axis Vertices > 173.\n\n"); for ( i=0 ; i 1 ) { num *= val; val--; } if ( num == 0 ) return 1; return num; }