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">10>
{
if(i<5 span="span">5>
{
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">4>
n--;
System.out.println();
}
}
}
Related Post: BlueJ Programs On Pattern
No comments:
Post a Comment