is still the contact function, but today's function and the first two days different, is a combination of function and if of the super function, as a slag I also rose a back to see, cultivate a return sentiment.
Take the topic as an example:
The number of daffodils, meaning that a number (ABC) satisfies A's three-square-+b of three-square-+c three-Times Square is equal to its own number, requiring writing a piece of code to determine whether a number is a narcissus number.
After combing the logical relationship, I wrote:
<script>
function Shuixian (X) {
var n = X;
N1 = N/10;
N2 = N1/10;
N3 = N2/10;
A = n%10;
b = Math.floor (n1);
c = b%10;
D = Math.floor (N2);
e = d%10;
F = Math.floor (n3);
g = f%10;
h = e*e*e+c*c*c+a*a*a;
if (h = = N) {
document.write ("Congratulations, Narcissus! "+h+" = "+n";
}
else{
document.write ("Damn retarded!") ")
}
}
Shuixian (156)
</script>
Cough, of course, the final output must be "Mom's retarded!" ”
This article is from the "12244243" blog, please be sure to keep this source http://12254243.blog.51cto.com/12244243/1877519
I heard a number called Narcissus?