#include <stdio.h>
#include <math.h>
#include <conio.h>
#include "Celsius.h"
int main()
{
float x;
printf("Enter the degrees Fahrenheit you wish to convert to Celsius: ");
scanf("%f", &x);
Celsius(x);
getch();
return(0);
}
And here is Celsius.h code:
#include <stdio.h>
void Celsius(float F)
{
float C;
C = ((F - 32) * (5 / 9));
printf("%.2f degrees Fahrenheit is the same as %.2f degrees Celsius!\n", F, C);
}
I am stumped. I don't see what is wrong nor can the internet tell me what is wrong with this. It tells me:
"(correct number) degrees Fahrenheit is the same as -0.00 degrees Celsius." Celsius is ALWAYS -0.00 degrees... haha I just don't see the error here... I feel so close and it is probably something silly... or maybe I did something completely wrong? I don't know...