# include <iostream>
using namespace std;
int main()
{
    cout << "By this program you can know about Whether a number is a  or not" ;
    cout << "Enter a number less than 1000 :- ";
    int a,b,c,e,f,g,k ;
    cin >> a;

    if (a < 1000)
    b=a/10;
    k=b+2  ;
    c=a-(k*10);
    e=k/10     ;
    f=k-(e*10)  ;
    g=c*c*c+e*e*e+f*f*f     ;
    {if (g==a)
    cout << b <<"Yes" ;
    else
    cout << b << "No" ;
    }

    else
    cout << "is not" ;
}

No thank you. I'm done with school. Now if you need help, ask a valid question.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.