Computer Science, asked by harshitpandey431868, 7 months ago

write a program in java to print the above patterns.............​

Attachments:

Answers

Answered by anshu604397
2

Answer:

B

BL

BLU

BLUE

BLUET

Explanation:

mark me as brainliest

Answered by Rounak1288
6

BLUEJ

BLUE

BLU

BL

B

*/

public class Q29A

{

public static void main(String args[])

{

System.out.println("\f");

String str="BLUEJ";

int n=str.length();

for(int i=n;i>=0;i--)

{

System.out.println(str.substring(0,i));

}

}

}

/**

J

And E

UUU

L L L L

B B B B B

*/

public class Q29B

{

public static void main(String args[])

{

String str="BLUEJ";

int n=str.length();

int k=0;

for(int i=4;i>=0;i--)

{

for(int j=0;j<=k;j++)

{

System.out.print(str.charAt(i));

}

System.out.println();

k++;

}

}

}

/**

BLUEJ

LUEJ

UEJ

NOT

J

*/

Hope you will do practical for better understanding of this program.

Hope You had liked my answer.

Keep Learning and Keep Growing

Stay Home Stay Safe ❤️❤️

Similar questions