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();
}
}
public static void main(String args[])
{
BlueJ ob=new BlueJ();
ob.show();
No comments:
Post a Comment