Source Code Character Frequency code-golf
Write a program using SBCS that get a single byte character as an input and prints the frequency of that character in the program's source code (percentage format) as an output.
Example:
Assuming my program is: ab#cd%b then the output of the program should be:
input output ----- ------ a 14.29% b 28.57% # 14.29% c 14.29% d 14.29% % 14.29% Notes:
- Output must be in percentage format.
- Printed value must be with 2 digits after decimal (Print 15.00%, not 15%. print 15.12%, not 15.12345%).
- You man trim the rest of the digits after decimal in any way you want (ceiling, round, floor, simple trimming, ...)
Scoring:
This is code-golf - the shortest code wins.