any time a number is present in a word inflate its value by 1........
for eg, input anyone up four tennis
output anytwo up five elevennis
import java.io.*;
public class inflationary
{
public void main()throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String num[]=new String[14];
num[0]="zero";
num[1]="one";
num[2]="two";
num[3]="three";
num[4]="four";
num[5]="five";
num[6]="six";
num[7]="seven";
num[8]="eight";
num[9]="nine";
num[10]="ten";
num[11]="eleven";
num[12]="twelve";
num[13]="thirteen";
String text;
String newtext=" ",word=" ";
System.out.println("ENTER A SENTENCE");
text=br.readLine();
int i,j;
int len=text.length();
for(i=0;i<len;i++)
{
if(text.charAt(i)!=' ')
{
word=word+text.charAt(i);
for(j=0;j<num.length-1;j++)
{
if(word==num[i])
{
newtext=text.replace(num[i],num[i+1]);
}
}
}
}
System.out.println(newtext);
}
}
no output came and no error was shown ..maybe there is some logical mistake pls help