Jump to content

Template:Percentage: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
examples should actually use the template
No edit summary
 
(26 intermediate revisions by 11 users not shown)
Line 1: Line 1:
<includeonly>{{#expr: {{{1}}}/{{{2}}}*100 round {{#ifeq: {{#expr: {{{3}}} >= 0 }} | 1 | {{{3}}} | 0 }} }}%</includeonly><noinclude>
<includeonly>{{#invoke:Percentage|main|{{#expr:{{formatnum:{{{1|0}}}|R}}}}|{{#expr:{{formatnum:{{{2|100}}}|R}}}}|{{{3|}}}|pad={{{pad|}}}|sigfig={{{sigfig|}}}|%={{{%|%}}}|nonscinote={{{nonscinote|}}}
}}</includeonly><noinclude>

{{documentation}}
;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 }}
[[Category:Mathematical function templates|Pct]]

</noinclude>
</noinclude>

Latest revision as of 15:23, 8 December 2019