I\'m doing a simple program for converting temperatures with Kelvin, Celsius and Fahrenheit, but I\'m getting this error when doing anything with kelvin:
Can
Try this.
public static float FahrenheitToKelvin(float fahrenheit) { return ((fahrenheit - 32f) * 5f) / 9f + 273.15f; }
This works because it changes the compiler from recognizing the 32 5 and so on as doubles. The f after the number tells the compiler it is a float.