You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// int celsius = (5 / 9) * (fahrenheit - 32); //Integer / Integer = Integer i.e, 5/9 = 0 which multiplied by anything gives o/p = 0
// int celsius = (5 * (fahrenheit - 32) / 9);
int celsius = (int) ((5.0 / 9) * (fahrenheit - 32)); //Explicit Type casting... double / integer = double which cannot be done by compiler so we need to explicitly type-cast the result into integer