If you want a function to be declared after the main function, be sure to include the fuction prototype before any call of the function
also
the fuction bmiCalc has no return type but you asigned it a return value in line 28
this should work
Code:
#include <stdio.h>
/*This is the function prototype declared before the main function. also i have given it a return *
* type of void since it souldn't return anything to the user*/
void bmiCalc(float height, float weight);
main()
{
float height, weight;
printf("Enter weight:\n ");
scanf("%f", &weight);
printf("Enter height in inches:\n ");
scanf("%f", &height);
bmiCalc(height, weight);
return 0;
}
void bmiCalc(float height, float weight)
{
float bmi;
bmi = (weight * 703) / (height * height);
printf("Your BMI is %.2f\n", bmi);
//There is no return 0; here because the return type of the bmiCalc is void
}
Hope this helps