Answers for "how to find common digit maths"

0

how to find common digit maths

Scanner in = new Scanner(System.in);
        System.out.print("Input the first number : ");
        int a = in.nextInt();  
		System.out.print("Input the second number: ");
		int b = in.nextInt(); 
		System.out.println("Result: "+result(a, b));
    }
	public static int result(int x, int y)
     {  
	if(x == y)
		return 0;
	    if(x % 6 == y % 6)
		    return (x < y) ? x : y;
	    return (x > y) ? x : y;
     }
}
Posted by: Guest on July-12-2021

Code answers related to "how to find common digit maths"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language