#include <stdio.h>
#include <stdlib.h>
int main()
{
int n, digit, sum =0;
printf("Enter a number to check for neon Number \n");
scanf("%d",&n);
int sq = n*n;
while(sq!=0){
digit = sq % 10;
sum += digit;
sq = sq/10;
}
if(sum == n)
printf("Neon Number \n");
else
printf("Not a Neon Number \n");
return 0;
}
No comments:
Post a Comment