I am creating a method called convertTemp(...) in java that takes a value , tempF,for the temperature in Fahrenheit as an input and convert the value into Centigrade (C) and displays its on screen. The formula for the conversion from Fahrenheit F to Centigrade C is C = 5/9*(F-32). The issue is I want to know what is my mistake of my code that cannot run in the eclipse.
package oop;
import java.util.Scanner;
public class convertTemp {
public static int temperature (int C , int F) {
int Fahrenheit =5/9*(F-32);
return Fahrenheit;
}
public static void main (String args []) {
// TODO Auto-generated method stub
int F ;
int C ;
Scanner sc = new Scanner(System.in);
System.out.println(" The temperature of Fahrenheit(F) : ");
F = sc.nextInt();
System.out .println(" The temperature of Centigrade(C) : " + C );