
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>


double mass,k,G;
double F,x;

long n;

int ac=1;

char filename[5][FILENAME_MAX];
FILE *pFile[5];

void main()
{

	printf("\n isolator_static_deflection.cpp  ver 1,0  September 24, 2007 ");
	printf("\n by Tom Irvine  Email: tomirvine@aol.com \n");

    while(ac==1)
	{

		printf("\n");
		printf(" Enter the mass (lbm) \n");
		scanf("%lf",&mass);

		printf("\n");
		printf(" Enter the number of isolators \n");
		scanf("%ld",&n);

		printf("\n");
		printf(" Enter the individual isolator stiffness (lbf/in) \n");
		scanf("%lf",&k);

		k*=n;

		printf("\n");
		printf(" Enter the acceleration (G) \n");
		scanf("%lf",&G);

		F=mass*G;

		x=F/k;

		printf("\n\n Deflection = %8.4g inch \n",x);

		printf("\n Another calculation? 1=yes 2=no \n"); 
		scanf("%d",&ac);
	
	}


//***************************************************************

/*

	printf("\n Enter the output filename \n");
	scanf("%s",filename[1]);

	pFile[1]=fopen(filename[1],"w");

	printf("\n Press any key to exit");
	getch();

*/

//***************************************************************
	
}
