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];

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]))

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 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.