package com.thinker.bishi.huawei; import java.util.Scanner; /** * @author lzh * @apiNote one two three four five six seven eight nine zero double ol * 还有一个表示零的忘记是什么了,只记得好像是以o开头的好像还是两位,就暂时用 * ol代替吧,原理一样的。*_* */ public class Convert { private static StringBuilder pri = new StringBuilder(); private static boolean isError = false; /** * @apiNote 检查字符串中有没有数字。 * @param str str * @return boolean */ private static boolean check(String str){ boolean result = true; char[] tmp = str.toCharArray(); for(int i=0;i= 65 && (int)tmp[i] <= 90) || ((int)tmp[i] >= 97 && (int)tmp[i] <= 122); } return result; } /** * @apiNote 利用递归判断当前字母表示的数字 * @param str char[] * @param curr 当前位置 * @param flag 前一个是否为double */ private static void result(char[] str,int curr,boolean flag){ if(!(curr