import java.util.Scanner; public class Main { public static void main(String arg[]){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int last = n%10; int ...
For calculations with arbitrary precision you need to specify how precise you want a calculated result. For BigDecimal calculations this is done using the MathContext ...