My code is giving a wrong output for the 3rd pair of vectors im finding the dot product of, although the first two are correct. (outputs - 0, 3, -3(should be 1))... I just cant find wahts wrong, i was guessing something to do with the -1 in the b array but no clues.
any help please and thankyou?
void vector_info(float, float);
double dot(float, float);
int main ()
void vector_info(float a, float b)
printf(" a . b = %4.1f\n", dot);
double dot(float a, float b)
return ((a*b) + (a*b) + (a*b));