Given a string s and a character letter, return the percentage of characters in s that equal letter rounded down to the nearest whole percent.

&nbsp;
Example 1:

Input: s = "foobar", letter = "o"
Output: 33
Explanation:
The percentage of characters in s that equal the letter 'o' is 2 / 6 * 100% = 33% when rounded down, so we return 33.


Example 2:

Input: s = "jjjj", letter = "k"
Output: 0
Explanation:
The percentage of characters in s that equal the letter 'k' is 0%, so we return 0.

&nbsp;
Constraints:


	1 &lt;= s.length &lt;= 100
	s consists of lowercase English letters.
	letter is a lowercase English letter.


class Solution:
    def percentageLetter(self, s: str, letter: str) -> int:
        return (s.count(letter)*100)//len(s)
class Solution {
    public int percentageLetter(String str, char letter) {
        int count=0;
        int n=str.length();
        for(int i=0;i<n;i++){
            if(str.charAt(i)==letter){

                count ++;
            }
        }
                 int per= (100*count)/n;
         return per;   
        
    }
}
class Solution {
public:
    int percentageLetter(string s, char letter) {
        int count=0;
        for(int i=0;i<s.length();i++)
        {  if(s[i]==letter)
            {
                count++;
            }
        }
        return (count*100)/s.length();
        
    }
};
var percentageLetter = function(s, letter) {
    let count = 0;
    for (let i of s) { // count how many letters are in s
        if (i == letter) count++;
    }
    return (Math.floor((count*1.0) / (s.length*1.0) * 100)) // get percentage
};
Percentage of Letter in String