Jump to content

Template:Percentage: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
«+";Aliases: * {{tl|%}} * {{tl|percentage}} * {{tl|percent}}", "Pct" → "Percentage"»
template doc
Line 1: Line 1:
<includeonly>{{#expr: {{{1}}}/{{{2}}}*100 round {{#ifeq: {{#expr: {{{3}}} >= 0 }} | 1 | {{{3}}} | 0 }} }}%</includeonly><noinclude>
<includeonly>{{#expr: {{{1}}}/{{{2}}}*100 round {{#ifeq: {{#expr: {{{3}}} >= 0 }} | 1 | {{{3}}} | 0 }} }}%</includeonly><noinclude>
{{Template doc}}

;Usage: <nowiki>{{</nowiki>Pct| ''numerator'' | ''denominator'' | ''decimals to round to (zero or greater)'' }}

;Examples:
* <nowiki>{{Pct | 1 | 3 | 3 }}</nowiki> yields {{Pct | 1 | 3 | 3 }}
* <nowiki>{{Pct | 2 | 10 | 3 }}</nowiki> yields {{Pct | 2 | 10 | 3 }}

;Aliases:
* {{tl|%}}
* {{tl|percentage}}
* {{tl|percent}}

[[Category:Mathematical function templates|Percentage]]

</noinclude>
</noinclude>

Revision as of 01:59, 20 February 2008