Saturday, October 25, 2014

Print A Pattern Using The Sentence BLUEJ


Print the pattern:
J
EE
UUU
LLLL
BBBB

Here is the program

class BlueJ
{
  int i,j,len;
 String s1="BLUEJ";
  void show()
 {
        len=s1.length();
        for (i=len-1;i>=0;i--)
        {
            for(j=len-1;j>=i;j--)
            System.out.print(s1.charAt(i));
           System.out.println();
  }
}
        Read: Computer Teacher at Burdwan
    public static void main(String args[])
    {
         BlueJ ob=new BlueJ();
         ob.show();

        }


Related PostBlueJ Programs On Pattern

No comments:

Post a Comment

Subscribe via email

Enter your email address:

Delivered by FeedBurner