For this Question: Given an integer N, your task is to print all the Armstrong numbers which are present between 1 to N.

<b>A number is said to Armstrong if it is equal to sum of cube of its digits. </b>The input contains a single integer N.

Constraints:-
1 < = N < = 1000Print all the number which are armstrong numbers less than equal to N.Sample Input:-
2

Sample Output:-
1

Sample input:-
4

Sample Output:
1, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;

bool checkArmstrong(int n)
{
    int temp = n, sum = 0;
    
    while(n > 0)
    {
        int d = n%10;
         sum = sum + d*d*d;
        n = n/10;
    }
    if(sum == temp)
      return true;
      
    return false;
}

int main()
{
    

    int n;
    cin>>n;
    
    for(int i = 1; i <= n; i++)
    {
        
          if(checkArmstrong(i) == true)
               cout << i << " ";
       }
    return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?