Integer "degreesC" remains equal to 0

Viewed 20

Whenever I print out degreesC, it stays equal to 0 even if I replace degreesF with a different number, it's still equal to 0. It only changes if I remove * (5/9), but the entire point of the code is to create a program that translates Fahrenheit to Celsius. Sorry if this is too simple of a question, I'm kind of new to this if you couldn't tell.

        int degreesF = 106;
        int degreesC = (degreesF - 32) * (5/9);
        System.out.println(degreesF + " degrees Fahrenheit = " +  degreesC + " degrees Celsius");
        
0 Answers
Related