Template:IsPrime: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
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:Templates]]
[[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!