Computer Science, asked by anirudhkumar312004, 1 year ago

Write a Java Program to display the following pattern:
B L U E J
L U E J B
U E J B L
J B L U E

Answers

Answered by ashishbarwar586
2

Simple pyramid pattern

import java.io.*;

// Java code to demonstrate star patterns

public class GeeksForGeeks

{

// Function to demonstrate printing pattern

public static void printStars(int n)

{

int i, j;

// outer loop to handle number of rows

// n in this case

for(i=0; i<n; i++)

{

// inner loop to handle number of columns

// values changing acc. to outer loop

for(j=0; j<=i; j++)

{

// printing stars

System.out.print("* ");

}

// ending line after each row

System.out.println();

}

}

// Driver Function

public static void main(String args


anirudhkumar312004: Yeah it's a simple star pattern, but Strings are used! Therefore this is not possible. Anyways, thank you for spending your valuable time and thinking for this!
ashishbarwar586: its oky
Answered by Anonymous
0

Hii

you are welcome in my ans

your solution is attached above ....

____/\____☺️

Hope it may helps you✊✊

Attachments:
Similar questions