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: #include <bits/stdc++.h> // header file includes every Standard library
using namespace std;

int main() {
	int n;
    cin>>n;
    int i=1, sum = 0;
    while(i<=10){
        int num = i*n;
        for(int i=0 ; i<4 ; i++){
            int tempSum = 0;
            while(num){
                tempSum += num%10;
                num/=10;
            }
            num = tempSum;
        }
        sum += num;
        i+=1;
    }
    cout<<sum<<"\n";
    return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?