Hi, I am trying to work out how to write an equation in C, i know it sounds stupid, but it when i set a variable, a equal to an equation, it says there is bad sytax before the =

i.e

where it says a =dx/2 ; the error here isCode:int trapezium()//this part copes with calculating in value of f(x) and then outputting the estimated area under the graph { float fx[11],y, a,b,c; for(i=0;i<11;i++) { fx[i] = (1 - v[i])/U; printf("function of x at speed %5.2f, is %5.2f\n", v[i], fx[i]); } a =dx/2 ; y = (2*(((1-v[1])/U) + ((1-v[2])/U) + ((1-v[3])/U)+ ((1-v[4])/U) + ((1-v[5])/U)+ ((1-v[6])/U)+ ((1-v[7])/U)+ ((1-v[8])/U)+ ((1-v[9])/U)))); printf("y = %f", y); }

E:\xxxxxxxxxxxxxxxxx\Boundary_Layer_Displacement\m ain.c|35|error: syntax error before '=' token|

i think there are a few brackets wrong with the y= but that can be sorted...

cheers guys