Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Functionality {
- public static void main(String[] args) {
- }
- public static String stringMean(String a){
- String f = "";
- if(a.length() > 0){
- int b = a.length();
- int c = 0;
- while(b>0){
- c = c + (int)a.charAt(b-1);
- b=b--;
- }
- double d = c / a.length();
- int e = (int)Math.round(d);
- f = Integer.toString(e);
- }
- return f;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement