I need some help with a program for converting Fahrenheit to Celsius in C. My code looks like this
#include <stdio.h>
int main(void)
{
int fahrenheit;
double celsius;
printf("Enter the temperature in degrees fahrenheit:\n\n\n\n");
scanf("%d", &fahrenheit);
celsius = (5 / 9) * (fahrenheit - 32);
printf("The converted temperature is %lf\n", celsius);
return 0;
}
Every time I execute it it the result is 0.000000. I know I'm missing something but can't figure out what.