#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <math.h>


int main (int argc, char **argv)
{


	//char p_value[150];
	//char s_value[150];
	//char r_value[150];
	double price, stop, r, shares;
	double calc;

        if(argc == 4){
                 //strcpy(p_value, argv[1]);
                 price=atof(argv[1]);
		stop=atof(argv[2]);
		r=atof(argv[3]);


                 //strcpy(type, argv[3]);
                 //printf("s: %d\n", sensitivity);
                 //w=atoi(argv[4]);
        }else{
                printf("wrong usage\n");
		printf(" ./shares [price] [stop] [r] \n");
                exit(0);
        }

	//calc = 

shares = r/(price-stop);
	//shares = 
printf("price: %.04lf stop: %.04lf r: %.04lf\n", price, stop, r);
printf("SHARES: %.04lf costing $%.04lf\n", shares, shares*price);


return 0;
}

