Program only displaying the 32 for when I have it print "NewTemp" NewTemp = 32 + input * 180/100; this part seems like the main problem
#include <stdio.h>
float celsius(float input) {
float NewTemp;
**NewTemp = 32 + input * 180/100;
printf("Please enter the temperature value to convert to fahrenheit
");
scanf("%f", &input);
printf("The temperature in celsius is: %f
", NewTemp);
return NewTemp;
}
int main(void){
float CelToFahren, input;
CelToFahren = celsius(input);
}
See Question&Answers more detail:os