0
The code for if a number is neon? Anyone?
3 Answers
+ 6
I think all don't know about neon number.
A neon number is a number where the sum of digits of square of the number is equal to the number.Â
ex
9
9ÂČ=81. 8+1=9
cin>>num
no=num*num;
while(no!=0)
{
sum+=noâ
10;
no/=10;
}
if(num==sum)
cout<<"neon no.";
+ 1
The atomic number of Neon is 10, it's a noble gas in the periodic table and therefore is in group 18.
Inorganic chemistry by Walter White
var testElement = 10;
var atomicNe = 10;
if (testElement == atomicNe){
cout<<"The tested element is Neon";
} else {
cout<<"You should be more particular wit your questions!";
}
Edit: pardon my ignorance in the matter, I just learned something new :)