Sorry, that was from last year. I totally forgot. But my professor didn't suggest me to use that way. Anyway thanx for reminding.
Type: Posts; User: curious
Sorry, that was from last year. I totally forgot. But my professor didn't suggest me to use that way. Anyway thanx for reminding.
any help?
d, dx, dy, dz are all defined as double. the program calculates the value of d using above given formula and compares with 1.0. if value of d is less than 1.0 then the program execute the things...
here d is defined like this way:
d = dx*dx + dy*dy + dz*dz;
if (d <1.0)
{
do something
}
when d = 1.0 my program should execute the things inside the if condition but it does. I am...
@tabstop :defined it but it didn't work
ok the basic structure is :
#define ......
int main()
{
}
bool func() /**bool is taken care of and works fine**/
@tabstop: how to do it then?
I have also called the same function in main and it's works fine but when i tired to call it in a subroutine it didn't work at all
#define a(r) (-4.0)*(1.0/(r))*((1.0/(r))-1.0)
And there is subroutine
which uses this function
tot = tot + a(r);
r is double and i mistype it i don't have ";" in my real code and 4 is 4.0 and 1 is 1.0 is my code. I am just trying to this pseudofunction .
r is double and i mistype it i don't have ";" in my real code and 4 is 4.0 and 1 is 1.0 is my code. I am just trying to this pseudofunction .
ok here's what i have done;
#define a(r) ((4)*(1/r)*(1-(1/r)));
using it like this:
tot = tot + a(r);
But while compiling i get :
thanx a lot
how to use _Bool?
How to declare boolena in C?
I tired to do
bool a;
And it didn't work for me gave
'bool' undeclared (first use in this function) , while compiling.
If i have declared void test( p, a, b, c, n) as a subroutine, how to call that subroutine in main program?
Thank you in advance.
thank you, I was being foolish due to time pressure. I really appreciate your help .
this is really good place to start programming.
Thank you again.
that is what i am doing? i can't change fahrenheit inside the loop. the user should be able to do it.
looping didn't work at all. I am getting into infinite loop.
i tired while didn't work.
Can you please write the whole main function?
I am trying to learn java. I know this place is for C but i really did not find other site to get help on java. So, i am hoping on you guys.
Problem: If the value of temp is < than 300, then the...
I did :
float d ;
if (d< 1.0f)
it worked
yes i print it.
overlap=0;
for (k=0; k<N-1; k++)
{
for (j=k+1; j<N; j++)
{
dx = fabs(x[k] - x[j]);
if (dx > L/2.0){ dx -=L;}
dy = fabs(y[k] - y[j]);
if (dy > L/2.0){ dy -=L;}
dz =...
if (d < 1.0)
{
overlap=1;
break;
}
I have a problem with above code. my program terminates as soon as the value of d gets 1.000000. But it should terminate only if d < 1.0