double coords[]={500, 750};
double vline[]={1, 1};
double a = coords[0] + coords[1];
double b = vline[0] + vline[1];
double c = a / b;
double d = c - coords[0];
double d1 = c - coords[1];
double e = c - d1;
double e1 = c - d;
System.out.println(e);
System.out.println(e1);
The two arrays at the top with the current values print out the following result e = 750.0, e1 = 500.0. However if I change the values in the vline array to for example "int vline[]={2, 1};" I should get the results e = 333.3333333333333, e1 = 83.33333333333331, but I don't I get the results e = 750.0, e1 = 500.0.

New Topic/Question
Reply



MultiQuote





|