ಟೆಂಪ್ಲೇಟು:Percentage

ವಿಕಿಪೀಡಿಯ ಇಂದ
Jump to navigation Jump to search
Template documentation[view] [edit] [history] [purge]

Usage[ಬದಲಾಯಿಸಿ]

{{percentage | numerator | denominator | decimals to round to (zero or greater) }}

Examples[ಬದಲಾಯಿಸಿ]

  • {{Percentage | 1 | 3 | 0 }} yields ೩೩%
  • {{Percentage | 1 | 3 | 2 }} yields ೩೩.೩೩%

Negative values can be used:

  • {{Percentage | -1 | 3 }} yields −೩೩%

Nornal operation is to cut off all decimal zeroes from right in rounding:

  • {{Percentage | 1 | 5 | 2 }} yields ೨೦%
  • {{Percentage | 1111 | 10000 | 4 }} yields ೧೧.೧೧%

Add |pad=yes to always get as many deciamls as specified, padding with zeroes where needed:

  • {{Percentage | 1 | 5 | 2 | pad=yes }} yields ೨೦.೦೦%
  • {{Percentage | 1111 | 10000 | 4 | pad=yes }} yields ೧೧.೧೧೦೦%

Third parameter can also be given through |pad=N:

  • {{Percentage | 111 | 1000 | pad=4 }} is same as {{Percentage | 111 | 1000 | 4 | pad=yes }} and yields ೧೧.೧೦೦೦%

Default denominator is 100:

  • {{Percentage | 20 }} yields ೨೦%

Default precision is zero:

  • {{Percentage | 1 | 3 }} yields ೩೩%

Aliases[ಬದಲಾಯಿಸಿ]

  • {{pct}}
  • {{percent}}

See also[ಬದಲಾಯಿಸಿ]