float promedi(a,b) is not the right way of defining the function. it should be float promedi(float a, float b)