prog.c: In function ‘main’:
prog.c:10:2: error: ‘cin’ undeclared (first use in this function)
cin >> g;
^~~
prog.c:10:2: note: each undeclared identifier is reported only once for each function it appears in
prog.c:16:13: warning: left-hand operand of comma expression has no effect [-Wunused-value]
for(i=0;i<n,i++) {
^
prog.c:16:17: error: expected ‘;’ before ‘)’ token
for(i=0;i<n,i++) {
^
prog.c:24:19: error: ‘xi’ undeclared (first use in this function)
b=(y[i+1]-y[i])/(xi+1]x[i])-Vy/Vx;
^~
prog.c:24:23: error: expected ‘)’ before ‘]’ token
b=(y[i+1]-y[i])/(xi+1]x[i])-Vy/Vx;
^
prog.c:24:23: error: expected ‘;’ before ‘]’ token
prog.c:24:23: error: expected statement before ‘]’ token
prog.c:24:25: warning: statement with no effect [-Wunused-value]
b=(y[i+1]-y[i])/(xi+1]x[i])-Vy/Vx;
~^~~
prog.c:24:28: error: expected ‘;’ before ‘)’ token
b=(y[i+1]-y[i])/(xi+1]x[i])-Vy/Vx;
^
prog.c:24:28: error: expected statement before ‘)’ token
prog.c:24:32: warning: statement with no effect [-Wunused-value]
b=(y[i+1]-y[i])/(xi+1]x[i])-Vy/Vx;
~~~^~~
prog.c:28:23: error: expected ‘)’ before ‘]’ token
Y=(y[i+1]-y[i])/(xi+1]x[i])*(X-x[i])+y[i];
^
prog.c:28:23: error: expected ‘;’ before ‘]’ token
prog.c:28:23: error: expected statement before ‘]’ token
prog.c:28:25: warning: statement with no effect [-Wunused-value]
Y=(y[i+1]-y[i])/(xi+1]x[i])*(X-x[i])+y[i];
~^~~
prog.c:28:28: error: expected ‘;’ before ‘)’ token
Y=(y[i+1]-y[i])/(xi+1]x[i])*(X-x[i])+y[i];
^
prog.c:28:28: error: expected statement before ‘)’ token
prog.c:28:29: error: invalid type argument of unary ‘*’ (have ‘double’)
Y=(y[i+1]-y[i])/(xi+1]x[i])*(X-x[i])+y[i];
^~~~~~~~~
prog.c:31:109: error: expected ‘)’ before ‘{’ token
if((((X>=x[i])&&(X<x[i+1]))||((X<=x[i])&&(X>x[i+1])))&&(((Y>=y[i])&&(Y<y[i+1]))||((Y<=y[i])&&(Y>y[i+1])) ) {
^
prog.c:37:2: error: expected expression before ‘}’ token
}
^
prog.c:39:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if(j=0) cout << "0" <<endl;
^~
prog.c:39:10: error: ‘cout’ undeclared (first use in this function)
if(j=0) cout << "0" <<endl;
^~~~
prog.c:39:24: error: ‘endl’ undeclared (first use in this function)
if(j=0) cout << "0" <<endl;
^~~~
prog.c:8:43: warning: variable ‘t’ set but not used [-Wunused-but-set-variable]
double Vx,Vy,g,x[1024],y[1024],X,Y,a,b,c,t;
^