im basically new to c programming, i wrote a code to work out a simple formula - t=R*C*ln(VC/(VC-VS)) however i keep getting illegal indirection and syntax error.
Here is the code
#include "assignment 1.h"
#define R 2;
#define C 2;
#define VS 50;
#define VC 33;
double t,a,b,c,d;
int main(void)
{
a=R*C;
c=VC-VS;
d=VC/c;
b=log(d);
t=a*b;
printf ("%d"), t;
system ("PAUSE");
return 0;
}
i have included in the header file the iostream library and the math library, looking at the code i cant find anything wrong with it.
PLEASE HELP!
Here is the code
#include "assignment 1.h"
#define R 2;
#define C 2;
#define VS 50;
#define VC 33;
double t,a,b,c,d;
int main(void)
{
a=R*C;
c=VC-VS;
d=VC/c;
b=log(d);
t=a*b;
printf ("%d"), t;
system ("PAUSE");
return 0;
}
i have included in the header file the iostream library and the math library, looking at the code i cant find anything wrong with it.
PLEASE HELP!
Comment