Help, no numerals
import java.util.*; public class Program { public static void main(String[] args) { Scanner sc=new Scanner (System.in); String s=sc.nextLine()+" "; String s1="",s2=""; String n="0123456789"; String t="10"; String no[]={"zero","one"," two","three","four","five","six","seven","eight","nine"}; for(int i=0;i<s.length();i++){ char ch=s.charAt(i); if(ch!=32){ s1=s1+ch; } else{ if(n.indexOf(s1)!=-1){ int n1=Integer.parseInt(s1); s2=s2+no[n1]+" "; } else if(s1.equals(t)){ s2=s2+"ten"+" "; } else{ s2=s2+s1+" "; } s1=""; } } } System.out.println(s2); } }