coding problem
Posted: Wed Aug 03, 2016 3:15 pm
hi .. i started a new project using GE and is out of games ranges
i made an app that's calculates the maximum momentum that the concrete can handle
but in the middle of my work a faced a problem .. i want to find (C) value , while(C) is a variable
from this equation 0.85*fc*B*C= As*600((D-C)/C)
so i used the following code but the GE crashes when i start the game(the app )
the code :
int i
double right = As*600((D-C)/C);
double Left = 0.85*fc*B*C;
double Find;
for (i=1;i<1000;i+=0.1)//while c can't reach 1000 and may have some below 1 values
{
right = As*600((D-i)/i);
Left = 0.85*fc*B*i;
find = right - Left;
if (find == 0)C = i;
else{}
}
please help me fast and THANKS
i made an app that's calculates the maximum momentum that the concrete can handle
but in the middle of my work a faced a problem .. i want to find (C) value , while(C) is a variable
from this equation 0.85*fc*B*C= As*600((D-C)/C)
so i used the following code but the GE crashes when i start the game(the app )
the code :
int i
double right = As*600((D-C)/C);
double Left = 0.85*fc*B*C;
double Find;
for (i=1;i<1000;i+=0.1)//while c can't reach 1000 and may have some below 1 values
{
right = As*600((D-i)/i);
Left = 0.85*fc*B*i;
find = right - Left;
if (find == 0)C = i;
else{}
}
please help me fast and THANKS