I keep gettin a General protection exception and I don't know why. I had this program working before I add <math.h> but know it just bums out on me.
#include<stdio.h>
#include<math.h>
float cal_winchil (float v,float t);
void print_chill (float a);
void main (void)
{
float b,c,d,e;
printf("Would you like to find the wind chill:Press any number(0 to quit)");
scanf("%f",&b);
while(b!=0)
{
printf("Please enter the wind velocity:\n");
scanf("%f",&e);
printf("Please enter a Temperature:\n");
scanf("%f",&c);
if(c<=10)
{
d=cal_winchil(c,e);
print_chill(d);
}
else
{
printf("Wind chill is not valid past +10");
}
printf("\n\n\nEnter another number (0 to quit):\n");
scanf("%f",&b);
}
}
float cal_winchil (float v,float t)
{
float w;
w=33-(10*v-sqrt(v)+10.5)*(33-t)/23.1;
return(w);
}
void print_chill (float a)
{
printf("The wind chill is:%3.2f",a);
}