Syvum Home Page

Home > Discussions > For all activities

Discussion topic: Contributed Answer/Explanation to Q. 12

Viewing replies        View entire discussion

To go to the homepage of this topic, click here.
Home: dj_glitzzzOriginal MessageReply  
Subject: Contributed Answer/Explanation to Q. 26
   :-
   <p>
   import java.io.*;
   </p>
   <p>
   class input 
   </p>
   <p>
    {
   </p>
   <p>
   public static void main(String arg[])throws IOException
   </p>
   <p>
      {
   </p>
   <p>
        BufferedReader br=new BufferedReader(new
   InputStreamReader(System.in));
   </p>
   <p>
        System.out.println("Enter String:");
   </p>
   <p>
        String s1=br.readLine( ); //take the input
   </p>
   <p>
        String s2=""; //create a blank string to store the reverse value
   </p>
   <p>
        int L=s1.length( ); //store the length
   </p>
   <p>
        char ch,ch2;
   </p>
   <p>
        int vowel=0;  // create a counter for counting the no. of vowels
   </p>
   <p>
    
   </p>
   <p>
        for(int i=0;i<L;i++)
   </p>
   <p>
        {
   </p>
   <p>
          ch=s1.charAt(i); //stores the character of that particular
   index
   </p>
   <p>
          
   </p>
   <p>
        
   if(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U'||ch=='a'||ch=='e'||ch=='i'||c
   h=='o'||ch=='u')
   </p>
   <p>
    {
   </p>
   <p>
      vowel++;
   </p>
   <p>
    }
   </p>
   <p>
   }
   </p>
   <p>
    
   </p>
   <p>
   for(intj=L;j>=0;j--)
   </p>
   <p>
   ch2=s1.charAt(j); //stores the character of that particular index
   </p>
   <p>
   s2=s2=ch2; // stores the reverse string
   </p>
   <p>
   }
   </p>
   <p>
   System.out.println("total no. of characters:"+L);
   </p>
   <p>
   System.out.println("no. of vowels:"+vowels);
   </p>
   <p>
   System.out.println("reverse string:"+s2);
   </p>
   <p>
   }
   </p>
   <p>
   }
   </p>
   <p>
    
   </p>
   <p>
          
   </p>

Posted at: Tue Jan 26 14:55:13 2010 (GMT)

Page 1 of 1
From: dj_glitzzzReply 1 of 6Reply
Subject: Contributed Answer/Explanation to Q. 26
   :-
   <p>
   import java.io.*; 
   </p>
   <p>
   class input 
   </p>
   <p>
    { 
   </p>
   <p>
   public static void main(String arg[])throws IOException 
   </p>
   <p>
      { 
   </p>
   <p>
        BufferedReader br=new BufferedReader(new
   InputStreamReader(System.in)); 
   </p>
   <p>
        System.out.println("Enter String:"); 
   </p>
   <p>
        String s1=br.readLine( ); //take the input 
   </p>
   <p>
        String s2=""; //create a blank string to store the reverse value 
   </p>
   <p>
        int L=s1.length( ); //store the length 
   </p>
   <p>
        char ch,ch2; 
   </p>
   <p>
        int vowel=0;  // create a counter for counting the no. of vowels 
   </p>
   <p>
    
   </p>
   <p>
        for(int i=0;i<L;i++) 
   </p>
   <p>
        { 
   </p>
   <p>
          ch=s1.charAt(i); //stores the character of that particular
   index 
   </p>
   <p>
          
   </p>
   <p>
        
   if(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U'||ch=='a'||ch=='e'||ch=='i'||c
   h=='o'||ch=='u') 
   </p>
   <p>
    { 
   </p>
   <p>
      vowel++; 
   </p>
   <p>
    } 
   </p>
   <p>
   } 
   </p>
   <p>
    
   </p>
   <p>
   for(intj=L;j>=0;j--) 
   </p>
   <p>
   ch2=s1.charAt(j); //stores the character of that particular index 
   </p>
   <p>
   s2=s2=ch2; // stores the reverse string 
   </p>
   <p>
   } 
   </p>
   <p>
   System.out.println("total no. of characters:"+L); 
   </p>
   <p>
   System.out.println("no. of vowels:"+vowels); 
   </p>
   <p>
   System.out.println("reverse string:"+s2); 
   </p>
   <p>
   } 
   </p>
   <p>
   } 
   </p>
   <p>
    
   </p>
   <p>
          
   </p>

Posted at: Tue Jan 26 14:56:31 2010 (GMT)

From: dj_glitzzzReply 2 of 6Reply
Subject: Contributed Answer/Explanation to Q. 26
   :-
   <p>
   import java.io.*; 
   </p>
   <p>
   class input 
   </p>
   <p>
    { 
   </p>
   <p>
   public static void main(String arg[])throws IOException 
   </p>
   <p>
      { 
   </p>
   <p>
        BufferedReader br=new BufferedReader(new
   InputStreamReader(System.in)); 
   </p>
   <p>
        System.out.println("Enter String:"); 
   </p>
   <p>
        String s1=br.readLine( ); //take the input 
   </p>
   <p>
        String s2=""; //create a blank string to store the reverse value 
   </p>
   <p>
        int L=s1.length( ); //store the length 
   </p>
   <p>
        char ch,ch2; 
   </p>
   <p>
        int vowel=0;  // create a counter for counting the no. of vowels 
   </p>
   <p>
    
   </p>
   <p>
        for(int i=0;i<L;i++) 
   </p>
   <p>
        { 
   </p>
   <p>
          ch=s1.charAt(i); //stores the character of that particular
   index 
   </p>
   <p>
          
   </p>
   <p>
        
   if(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U'||ch=='a'||ch=='e'||ch=='i'||c
   h=='o'||ch=='u') 
   </p>
   <p>
    { 
   </p>
   <p>
      vowel++; 
   </p>
   <p>
    } 
   </p>
   <p>
   } 
   </p>
   <p>
    
   </p>
   <p>
   for(intj=L;j>=0;j--) 
   </p>
   <p>
   ch2=s1.charAt(j); //stores the character of that particular index 
   </p>
   <p>
   s2=s2=ch2; // stores the reverse string 
   </p>
   <p>
   } 
   </p>
   <p>
   System.out.println("total no. of characters:"+L); 
   </p>
   <p>
   System.out.println("no. of vowels:"+vowels); 
   </p>
   <p>
   System.out.println("reverse string:"+s2); 
   </p>
   <p>
   } 
   </p>
   <p>
   } 
   </p>
   <p>
    
   </p>
   <p>
          
   </p>

Posted at: Tue Jan 26 14:57:25 2010 (GMT)

From: dj_glitzzzReply 3 of 6Reply
Subject: Contributed Answer/Explanation to Q. 26
   :-
   <p>
   import java.io.*; 
   </p>
   <p>
   class input 
   </p>
   <p>
    { 
   </p>
   <p>
   public static void main(String arg[])throws IOException 
   </p>
   <p>
      { 
   </p>
   <p>
        BufferedReader br=new BufferedReader(new
   InputStreamReader(System.in)); 
   </p>
   <p>
        System.out.println("Enter String:"); 
   </p>
   <p>
        String s1=br.readLine( ); //take the input 
   </p>
   <p>
        String s2=""; //create a blank string to store the reverse value 
   </p>
   <p>
        int L=s1.length( ); //store the length 
   </p>
   <p>
        char ch,ch2; 
   </p>
   <p>
        int vowel=0;  // create a counter for counting the no. of vowels 
   </p>
   <p>
    
   </p>
   <p>
        for(int i=0;i<L;i++) 
   </p>
   <p>
        { 
   </p>
   <p>
          ch=s1.charAt(i); //stores the character of that particular
   index 
   </p>
   <p>
          
   </p>
   <p>
        
   if(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U'||ch=='a'||ch=='e'||ch=='i'||c
   h=='o'||ch=='u') 
   </p>
   <p>
    { 
   </p>
   <p>
      vowel++; 
   </p>
   <p>
    } 
   </p>
   <p>
   } 
   </p>
   <p>
    
   </p>
   <p>
   for(intj=L;j>=0;j--) 
   </p>
   <p>
   ch2=s1.charAt(j); //stores the character of that particular index 
   </p>
   <p>
   s2=s2=ch2; // stores the reverse string 
   </p>
   <p>
   } 
   </p>
   <p>
   System.out.println("total no. of characters:"+L); 
   </p>
   <p>
   System.out.println("no. of vowels:"+vowels); 
   </p>
   <p>
   System.out.println("reverse string:"+s2); 
   </p>
   <p>
   } 
   </p>
   <p>
   } 
   </p>
   <p>
    
   </p>
   <p>
          
   </p>

Posted at: Tue Jan 26 14:58:30 2010 (GMT)

From: dj_glitzzzReply 4 of 6Reply
Subject: Contributed Answer/Explanation to Q. 26
   :-
   
   import java.io.*; 
   
   
   class input 
   
   
    { 
   
   
   public static void main(String arg[])throws IOException 
   
   
      { 
   
   
        BufferedReader br=new BufferedReader(new
   InputStreamReader(System.in)); 
   
   
        System.out.println("Enter String:"); 
   
   
        String s1=br.readLine( ); //take the input 
   
   
        String s2=""; //create a blank string to store the reverse value 
   
   
        int L=s1.length( ); //store the length 
   
   
        char ch,ch2; 
   
   
        int vowel=0;  // create a counter for counting the no. of vowels 
   
   
    
   
   
        for(int i=0;i 
   
   
        { 
   
   
          ch=s1.charAt(i); //stores the character of that particular
   index 
   
   
          
   
   
        
   if(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U'||ch=='a'||ch=='e'||ch=='i'||c
   h=='o'||ch=='u') 
   
   
    { 
   
   
      vowel++; 
   
   
    } 
   
   
   } 
   
   
    
   
   
   for(intj=L;j>=0;j--) 
   
   
   ch2=s1.charAt(j); //stores the character of that particular index 
   
   
   s2=s2=ch2; // stores the reverse string 
   
   
   } 
   
   
   System.out.println("total no. of characters:"+L); 
   
   
   System.out.println("no. of vowels:"+vowels); 
   
   
   System.out.println("reverse string:"+s2); 
   
   
   } 
   
   
   } 
   
   
    
   
   
          

Posted at: Fri Feb 26 07:20:16 2010 (GMT)

From: krutikaReply 5 of 6Reply
Subject: Re: Contributed Answer/Explanation to Q. 26
   hello can u please make up a program without using buffered reader statement
   itz a damn lengthy process
   try on simple one na

Posted at: Tue Oct 26 14:29:09 2010 (GMT)

From: krutikaReply 6 of 6Reply
Subject: Re: Contributed Answer/Explanation to Q. 26
   hello can u please make up a program without using buffered reader statement
   itz a damn lengthy process
   try on simple one na

Posted at: Tue Oct 26 14:29:19 2010 (GMT)

Page 1 of 1

To post to this forum, you must be signed in as a Syvum member. Please sign in / register as a member.

Contact Info © 1999-2024 Syvum Technologies Inc. Privacy Policy Disclaimer and Copyright