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

First build an array of numbers...

String [] numbers=new String[13];
	numbers[0]="zero";
	numbers[1]="one";
	....
	....
	....

After array read input line from whatever device you need...
and declare one more string to handle new text like this...

String text=keyb.readLine();
	String newtext=text;

now make a loop thought all of array

for (int i=0;i<numbers.length;i++) {}

and here are some conditions involved..

if (text.contains(numbers[i]))
{
	newtext=newtext.replace(numbers[i],numbers[i+1]);
}

Rest is System.out.println,... for printing newtext

If this solved your problem, please mark thread SOLVED, if not i'll be glad to answer any of your question about this solution

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.