Computer Science, asked by rehanrajuc7, 3 months ago

Write a program to
generate
the following patterns
A
B B
C C
D D DD

Answers

Answered by rupanjana43
2

Answer:

class GFG

{

public static void main(String args[])

{

int i, j, n = 5;

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

{

int ch = 65;

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

{

System.out.print((char)(ch -1 + j) + " ");

}

System.out.print("\n");

}

}

}

pls mark me as the brainliest


rehanrajuc7: How did do this
rupanjana43: with hands
Similar questions