Check out example codes for "convert fahrenheit to celsius". It will help you in understanding the concepts better.

Code Example 1

import java.util.Scanner;

public class Main {

    public static void main(String args[]) {
        Scanner sc = new Scanner(;
        int far = sc.nextInt();
        int cel = (far - 32) * 5/9;
        System.out.printf("%d Fahrenheit is %d Celsius", far, cel);

Learn ReactJs, React Native from