0
import java.io.*;
class Hki
{
public void main()throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader (System.in));
System.out.println("enter the code");
String s=br.readLine();
int l=s.length();
int n=0;
String g="",y="";
for(int i=l-1;i>=0;i--)
{
g=g+s.charAt(i);
}
for(int j=0;j<l;j++)
{
int ch =(int)g.charAt(j);
ch=ch-48;
n=n*10+ch;
if((n>=65&&n<=90)||n==32||(n>=97&&n<=122))
{
y=y+(char)n;
}
else continue;
}
System.out.println("y="+y);
}
}
only frst letr is printng
class Hki
{
public void main()throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader (System.in));
System.out.println("enter the code");
String s=br.readLine();
int l=s.length();
int n=0;
String g="",y="";
for(int i=l-1;i>=0;i--)
{
g=g+s.charAt(i);
}
for(int j=0;j<l;j++)
{
int ch =(int)g.charAt(j);
ch=ch-48;
n=n*10+ch;
if((n>=65&&n<=90)||n==32||(n>=97&&n<=122))
{
y=y+(char)n;
}
else continue;
}
System.out.println("y="+y);
}
}
only frst letr is printng
abhishreya
Feb 09, '13
No solutions for this question so far. Share this question on Facebook, Google, Twitter or answer this question.
Log in to your account to answer this questions.