public class reverse
{ public static void main(String args[]) throws IOException
{
InputStreamReader read = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(read);
System.out.println("Enter string(uppercase)");
String s=br.readLine();
s = s.toUpperCase();
StringBuffer revs = new StringBuffer(s);
int ch = revs.length();
int vow = 0;
for(int i=0;i
{vow++;}
}
revs.reverse();
System.out.println("Total number of characters: " +ch);
System.out.println("Number of vowels: "+vow);
System.out.println("Reverse String: "+revs);
}
}
No comments:
Post a Comment