#include <stdio.h>
#define F(x) 32 + (x*9)/5
int main(void)
{
int F,C;
printf ("Enter temperature in celsius=");
scanf ("%d",&C);
F(C);
printf (" %d fahrenheit = %d celsius\n", F, C);
return 0;
}
When I input 10 celsius, it comes out some as:
1798680630 fahrenheit = 10 celsius
Am I writing the formula wrongly? I can't seem to figure out the error. Just a beginner, going through my tutorials. Thank you!