So I have a pretty simple code to calculate the speed of sound using an input form the user, when I run the program I get an answer but its not correct and I get the error
'Line 14: assignment makes integer from pointer without cast'.
I don't know what that means and have tried adjusting my pointer and function to try and fix this problem. Any help would be appreciated.
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int SpeedofSound(int t,int Answer);
int t,Answer;
int *pAnswer;
int main(void)
{
printf("Please enter a Temp (Fahrenheit) to calculate the speed of sound.\n");
scanf(" %d", &t);
Answer = SpeedofSound;
printf("At Temp %d, the Speed of sound is %d feet/second.", t, Answer);
return 0;
}
int SpeedofSound(int t,int Answer)
{
*pAnswer = 1086 * sqrt(((5 * t) + 297)/247);
Answer = *pAnswer;
return (Answer);
}