Tuesday, December 4, 2012

Pattern On Characters Using BlueJ





Here is a pattern given below and the pattern will be displayed using both BlueJ.



ABCDE
BCDE
CDE
DE
E
f
fg
fgh
fghi
fghij


BlueJ program of the pattern

class archisman
{
 int i,j,n=5;
 char ch;
 public void show()
 {
      for(i=0;i<10 i="i" span="span">
      {
        if(i<5 span="span">
        {
            ch='A';
        ch=(char)(ch+i);
    }
    else
    ch='f';
             
           for(j=0;j
           {
                System.out.print(ch);
        ch=(char)(ch+1);
                }
              if(i>=5)
              n++;
              else if(i<4 span="span">
              n--;
            System.out.println();
        }
    }
}





Related PostBlueJ Programs On Pattern


No comments:

Post a Comment

Subscribe via email

Enter your email address:

Delivered by FeedBurner