public class WordPrint
{
public static void main(String args[])
{
String st="WELCOME TO INSPIRE SKILLS";
String word="";
int i,l,l1,j;
char ch,ch1;
st=st+" ";
l=st.length();
for(i=0;i<l;i++)
{
ch=st.charAt(i);
if(ch!=' ')
{
word=word+ch;
}
else
{
l1=word.length();
for(j=l1-1;j>=0;j--)
{
ch1=word.charAt(j);
System.out.print(ch1);
}
System.out.print(" ");
word="";
}
}
}
}
{
public static void main(String args[])
{
String st="WELCOME TO INSPIRE SKILLS";
String word="";
int i,l,l1,j;
char ch,ch1;
st=st+" ";
l=st.length();
for(i=0;i<l;i++)
{
ch=st.charAt(i);
if(ch!=' ')
{
word=word+ch;
}
else
{
l1=word.length();
for(j=l1-1;j>=0;j--)
{
ch1=word.charAt(j);
System.out.print(ch1);
}
System.out.print(" ");
word="";
}
}
}
}