TO FIND WHETHER THE NUMBER IS NEONE OR NOT
public class neon
{
public static void mkp(int n)
{
int sq;
int r;
int sum = 0;
{
sq = n*n;
while (sq >0)
{
r = sq % 10;
sum = sum + r;
sq = sq / 10;
}
{
if(sum == n)
System.out.println("the number is neon number ");
else
System.out.println("number is nt a neon number");
}
}
}
}
public class neon
{
public static void mkp(int n)
{
int sq;
int r;
int sum = 0;
{
sq = n*n;
while (sq >0)
{
r = sq % 10;
sum = sum + r;
sq = sq / 10;
}
{
if(sum == n)
System.out.println("the number is neon number ");
else
System.out.println("number is nt a neon number");
}
}
}
}
No comments:
Post a Comment