Template:IsPrime: Difference between revisions
Jump to navigation
Jump to search
Apple Bottom (talk | contribs) Template to test primality (of numbers <= 1000). Have I mentioned I can't wait for Lua scripting? |
|||
| Line 179: | Line 179: | ||
:{{#if: {{isPrime|587}} | 587 is prime! | 587 is not prime! }} | :{{#if: {{isPrime|587}} | 587 is prime! | 587 is not prime! }} | ||
[[Category: | [[Category:Infobox subtemplates]] | ||
Latest revision as of 16:34, 18 February 2022
This template can be used to test if a number (up to 1000) is prime. Here is a simple example of its usage:
You write:
- {{#if: {{isPrime|587}} | 587 is prime! | 587 is not prime! }}
You see:
- 587 is prime!