For this Question: Write a program to calculate the sum of the numbers occurring in the multiplication table of the given integer up to 10, and the numbers occurring in the multiplication table should be a single-digit number, if it's not single-digit then you need to sum its digit until it becomes a single-digit number before taking the sum.
i.e. 1x1=1, 1x2=2, ....,1x10=10. so the sum is 1+2+3...+10 => now 10 is a 2 digit number so it becomes 1+0=1, i.e sum becomes 46.The only line contains the value of integer n

<b>Constraints</b>
1 &le; n &le; 10Print the sumSample Input:
1

Sample output:
46

<b>Explanation</b>
As explained above in the Question., I have written this Solution Code: import java.util.*;
import java.lang.*;
import java.io.*;
class Solution {
    public static int calculateSum(int n) {
        int i = 1, sum = 0;
         while(i <= 10) {
         int num = i * n;
         for(int j = 0; j < 4; j++) {
         int tempSum = 0;
         while(num != 0) {
         tempSum += num % 10;
         num /= 10;
        }
       num = tempSum;
        }
       sum += num;
       i += 1;
       }
       return sum;
     }
}
class Main{
public static void main(String[] args) throws java.lang.Exception{
        Scanner myobj = new Scanner(System.in);
        int n = myobj.nextInt();
        Solution obj=new Solution();
        System.out.println(obj.calculateSum(n));
    }
}
, In this Programming Language: Java, Now tell me if this Code is compilable or not?