#include <bits/stdc++.h>
using namespace std;
int main()
{
int num, square, rem, sum = 0;
cout << "Enter the number" << endl;
cin >> num;
square = num * num;
while (square > 0)
{
rem = square % 10;
sum = sum + rem;
square = square / 10;
}
if (sum == num)
cout << num << " is a Neon number" << endl;
else
cout << num << " is not a Neon number" << endl;
return 0;
}
Category: Python | General Programming
Relavent Tags: Mathematics